Skip to content

Commit

Permalink
Fixed origin offset issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Nash committed Sep 23, 2016
1 parent 4e52985 commit d563755
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 24 deletions.
8 changes: 5 additions & 3 deletions Sources/Managers/M13CheckboxBounceManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,11 @@ internal class M13CheckboxBounceManager: M13CheckboxManager {

override func layoutLayers() {
// Frames
unselectedBoxLayer.frame = CGRect(x: 0.0, y: 0.0, width: paths.size, height: paths.size)
selectedBoxLayer.frame = CGRect(x: 0.0, y: 0.0, width: paths.size, height: paths.size)
markLayer.frame = CGRect(x: 0.0, y: 0.0, width: paths.size, height: paths.size)
let x: CGFloat = paths.boxLineWidth / 2.0
let y: CGFloat = paths.boxLineWidth / 2.0
unselectedBoxLayer.frame = CGRect(x: x, y: y, width: paths.size, height: paths.size)
selectedBoxLayer.frame = CGRect(x: x, y: y, width: paths.size, height: paths.size)
markLayer.frame = CGRect(x: x, y: y, width: paths.size, height: paths.size)
// Paths
unselectedBoxLayer.path = paths.pathForBox().cgPath
selectedBoxLayer.path = paths.pathForBox().cgPath
Expand Down
8 changes: 5 additions & 3 deletions Sources/Managers/M13CheckboxDotManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,11 @@ internal class M13CheckboxDotManager: M13CheckboxManager {

override func layoutLayers() {
// Frames
unselectedBoxLayer.frame = CGRect(x: 0.0, y: 0.0, width: paths.size, height: paths.size)
selectedBoxLayer.frame = CGRect(x: 0.0, y: 0.0, width: paths.size, height: paths.size)
markLayer.frame = CGRect(x: 0.0, y: 0.0, width: paths.size, height: paths.size)
let x: CGFloat = paths.boxLineWidth / 2.0
let y: CGFloat = paths.boxLineWidth / 2.0
unselectedBoxLayer.frame = CGRect(x: x, y: y, width: paths.size, height: paths.size)
selectedBoxLayer.frame = CGRect(x: x, y: y, width: paths.size, height: paths.size)
markLayer.frame = CGRect(x: x, y: y, width: paths.size, height: paths.size)
// Paths
unselectedBoxLayer.path = (paths as! M13CheckboxDotPathPresets).pathForDot().cgPath
selectedBoxLayer.path = paths.pathForBox().cgPath
Expand Down
8 changes: 5 additions & 3 deletions Sources/Managers/M13CheckboxExpandManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,11 @@ internal class M13CheckboxExpandManager: M13CheckboxManager {

override func layoutLayers() {
// Frames
unselectedBoxLayer.frame = CGRect(x: 0.0, y: 0.0, width: paths.size, height: paths.size)
selectedBoxLayer.frame = CGRect(x: 0.0, y: 0.0, width: paths.size, height: paths.size)
markLayer.frame = CGRect(x: 0.0, y: 0.0, width: paths.size, height: paths.size)
let x: CGFloat = paths.boxLineWidth / 2.0
let y: CGFloat = paths.boxLineWidth / 2.0
unselectedBoxLayer.frame = CGRect(x: x, y: y, width: paths.size, height: paths.size)
selectedBoxLayer.frame = CGRect(x: x, y: y, width: paths.size, height: paths.size)
markLayer.frame = CGRect(x: x, y: y, width: paths.size, height: paths.size)
// Paths
unselectedBoxLayer.path = paths.pathForBox().cgPath
selectedBoxLayer.path = paths.pathForBox().cgPath
Expand Down
8 changes: 5 additions & 3 deletions Sources/Managers/M13CheckboxFadeManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,11 @@ internal class M13CheckboxFadeManager: M13CheckboxManager {

override func layoutLayers() {
// Frames
unselectedBoxLayer.frame = CGRect(x: 0.0, y: 0.0, width: paths.size, height: paths.size)
selectedBoxLayer.frame = CGRect(x: 0.0, y: 0.0, width: paths.size, height: paths.size)
markLayer.frame = CGRect(x: 0.0, y: 0.0, width: paths.size, height: paths.size)
let x: CGFloat = paths.boxLineWidth / 2.0
let y: CGFloat = paths.boxLineWidth / 2.0
unselectedBoxLayer.frame = CGRect(x: x, y: y, width: paths.size, height: paths.size)
selectedBoxLayer.frame = CGRect(x: x, y: y, width: paths.size, height: paths.size)
markLayer.frame = CGRect(x: x, y: y, width: paths.size, height: paths.size)
// Paths
unselectedBoxLayer.path = paths.pathForBox().cgPath
selectedBoxLayer.path = paths.pathForBox().cgPath
Expand Down
8 changes: 5 additions & 3 deletions Sources/Managers/M13CheckboxFillManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,11 @@ internal class M13CheckboxFillManager: M13CheckboxManager {

override func layoutLayers() {
// Frames
unselectedBoxLayer.frame = CGRect(x: 0.0, y: 0.0, width: paths.size, height: paths.size)
selectedBoxLayer.frame = CGRect(x: 0.0, y: 0.0, width: paths.size, height: paths.size)
markLayer.frame = CGRect(x: 0.0, y: 0.0, width: paths.size, height: paths.size)
let x: CGFloat = paths.boxLineWidth / 2.0
let y: CGFloat = paths.boxLineWidth / 2.0
unselectedBoxLayer.frame = CGRect(x: x, y: y, width: paths.size, height: paths.size)
selectedBoxLayer.frame = CGRect(x: x, y: y, width: paths.size, height: paths.size)
markLayer.frame = CGRect(x: x, y: y, width: paths.size, height: paths.size)
// Paths
unselectedBoxLayer.path = paths.pathForBox().cgPath
selectedBoxLayer.path = paths.pathForBox().cgPath
Expand Down
8 changes: 5 additions & 3 deletions Sources/Managers/M13CheckboxFlatManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,11 @@ internal class M13CheckboxFlatManager: M13CheckboxManager {

override func layoutLayers() {
// Frames
unselectedBoxLayer.frame = CGRect(x: 0.0, y: 0.0, width: paths.size, height: paths.size)
selectedBoxLayer.frame = CGRect(x: 0.0, y: 0.0, width: paths.size, height: paths.size)
markLayer.frame = CGRect(x: 0.0, y: 0.0, width: paths.size, height: paths.size)
let x: CGFloat = paths.boxLineWidth / 2.0
let y: CGFloat = paths.boxLineWidth / 2.0
unselectedBoxLayer.frame = CGRect(x: x, y: y, width: paths.size, height: paths.size)
selectedBoxLayer.frame = CGRect(x: x, y: y, width: paths.size, height: paths.size)
markLayer.frame = CGRect(x: x, y: y, width: paths.size, height: paths.size)
// Paths
unselectedBoxLayer.path = paths.pathForBox().cgPath
selectedBoxLayer.path = paths.pathForBox().cgPath
Expand Down
8 changes: 5 additions & 3 deletions Sources/Managers/M13CheckboxSpiralManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,11 @@ internal class M13CheckboxSpiralManager: M13CheckboxManager {

override func layoutLayers() {
// Frames
unselectedBoxLayer.frame = CGRect(x: 0.0, y: 0.0, width: paths.size, height: paths.size)
selectedBoxLayer.frame = CGRect(x: 0.0, y: 0.0, width: paths.size, height: paths.size)
markLayer.frame = CGRect(x: 0.0, y: 0.0, width: paths.size, height: paths.size)
let x: CGFloat = paths.boxLineWidth / 2.0
let y: CGFloat = paths.boxLineWidth / 2.0
unselectedBoxLayer.frame = CGRect(x: x, y: y, width: paths.size, height: paths.size)
selectedBoxLayer.frame = CGRect(x: x, y: y, width: paths.size, height: paths.size)
markLayer.frame = CGRect(x: x, y: y, width: paths.size, height: paths.size)
// Paths
unselectedBoxLayer.path = paths.pathForBox().cgPath
selectedBoxLayer.path = paths.pathForBox().cgPath
Expand Down
8 changes: 5 additions & 3 deletions Sources/Managers/M13CheckboxStrokeManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,11 @@ internal class M13CheckboxStrokeManager: M13CheckboxManager {

override func layoutLayers() {
// Frames
unselectedBoxLayer.frame = CGRect(x: 0.0, y: 0.0, width: paths.size, height: paths.size)
selectedBoxLayer.frame = CGRect(x: 0.0, y: 0.0, width: paths.size, height: paths.size)
markLayer.frame = CGRect(x: 0.0, y: 0.0, width: paths.size, height: paths.size)
let x: CGFloat = paths.boxLineWidth / 2.0
let y: CGFloat = paths.boxLineWidth / 2.0
unselectedBoxLayer.frame = CGRect(x: x, y: y, width: paths.size, height: paths.size)
selectedBoxLayer.frame = CGRect(x: x, y: y, width: paths.size, height: paths.size)
markLayer.frame = CGRect(x: x, y: y, width: paths.size, height: paths.size)
// Paths
unselectedBoxLayer.path = paths.pathForBox().cgPath
selectedBoxLayer.path = paths.pathForBox().cgPath
Expand Down

0 comments on commit d563755

Please sign in to comment.