Skip to content

Commit

Permalink
2.0.10
Browse files Browse the repository at this point in the history
  • Loading branch information
efremidze committed Jul 11, 2018
1 parent c91e6e4 commit 0d12ff5
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 7 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Change log

## [Version 2.0.10](https://github.com/efremidze/Magnetic/releases/tag/2.0.10)
Released on 2018-07-10

- Label alignment fixed

## [Version 2.0.9](https://github.com/efremidze/Magnetic/releases/tag/2.0.9)
Released on 2018-05-18

Expand Down
2 changes: 1 addition & 1 deletion Magnetic.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = 'Magnetic'
s.version = '2.0.9'
s.version = '2.0.10'
s.summary = 'SpriteKit Floating Bubble Picker (inspired by Apple Music)'
s.homepage = 'https://github.com/efremidze/Magnetic'
s.license = { :type => 'MIT', :file => 'LICENSE' }
Expand Down
2 changes: 1 addition & 1 deletion Sources/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>2.0.9</string>
<string>2.0.10</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
Expand Down
4 changes: 2 additions & 2 deletions Sources/Magnetic.swift
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,15 @@ import SpriteKit
func configure() {
let strength = Float(max(size.width, size.height))
let radius = strength.squareRoot() * 100

physicsWorld.gravity = CGVector(dx: 0, dy: 0)
physicsBody = SKPhysicsBody(edgeLoopFrom: { () -> CGRect in
var frame = self.frame
frame.size.width = CGFloat(radius)
frame.origin.x -= frame.size.width / 2
return frame
}())

magneticField.region = SKRegion(radius: radius)
magneticField.minimumRadius = radius
magneticField.strength = strength
Expand Down
2 changes: 1 addition & 1 deletion Sources/MagneticView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class MagneticView: SKView {
func commonInit() {
_ = magnetic
}

public override func layoutSubviews() {
super.layoutSubviews()

Expand Down
4 changes: 2 additions & 2 deletions Sources/SKMultilineLabelNode.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ import SpriteKit
var stack = Stack<String>()
var sizingLabel = makeSizingLabel()
let words = separator.map { text.components(separatedBy: $0) } ?? text.map { String($0) }
for word in words {
for (index, word) in words.enumerated() {
sizingLabel.text += word
if sizingLabel.frame.width > width {
if sizingLabel.frame.width > width, index > 0 {
stack.add(toStack: word)
sizingLabel = makeSizingLabel()
} else {
Expand Down

0 comments on commit 0d12ff5

Please sign in to comment.