sugarcube 1.3.3 → 1.3.4
Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock
CHANGED
@@ -3,27 +3,27 @@ class CAAnimation
|
|
3
3
|
class << self
|
4
4
|
|
5
5
|
def basic(target, key_path, options={}, &block)
|
6
|
-
|
7
|
-
|
8
|
-
|
6
|
+
animation = CABasicAnimation.animationWithKeyPath(key_path)
|
7
|
+
animation.duration = options[:duration] if options[:duration]
|
8
|
+
animation.delegate = options[:delegate] if options[:delegate]
|
9
9
|
|
10
10
|
if options.key?(:from) || options.key?(:to) || options.key?(:by)
|
11
11
|
add_animation = options.fetch(:add, true)
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
animation.fromValue = options[:from] if options[:from]
|
14
|
+
animation.toValue = options[:to] if options[:to]
|
15
|
+
animation.byValue = options[:by] if options[:by]
|
16
16
|
else
|
17
17
|
add_animation = options.fetch(:add, false)
|
18
18
|
end
|
19
19
|
|
20
20
|
if add_animation
|
21
|
-
target.addAnimation(
|
21
|
+
target.addAnimation(animation, forKey:key_path)
|
22
22
|
target.send("#{key_path}=", options[:to])
|
23
23
|
end
|
24
24
|
|
25
|
-
block.call(
|
26
|
-
return
|
25
|
+
block.call(animation) if block
|
26
|
+
return animation
|
27
27
|
end
|
28
28
|
|
29
29
|
end
|
@@ -245,7 +245,7 @@ class UIImage
|
|
245
245
|
thumbnail_y = position.y * (new_size.height - my_size.height) / my_size.height
|
246
246
|
|
247
247
|
new_image = self.canvas(size: new_size) do
|
248
|
-
thumbnail_rect =
|
248
|
+
thumbnail_rect = CGRect.new([0, 0], [0, 0])
|
249
249
|
thumbnail_rect.origin = [thumbnail_x, thumbnail_y]
|
250
250
|
thumbnail_rect.size = my_size
|
251
251
|
|
@@ -355,7 +355,7 @@ class UIImage
|
|
355
355
|
CGContextDrawPath(context, KCGPathFill)
|
356
356
|
end
|
357
357
|
|
358
|
-
thumbnail_rect =
|
358
|
+
thumbnail_rect = CGRect.new([0, 0], [0, 0])
|
359
359
|
thumbnail_rect.origin = thumbnail_point
|
360
360
|
thumbnail_rect.size.width = scaled_width
|
361
361
|
thumbnail_rect.size.height = scaled_height
|
data/lib/sugarcube/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sugarcube
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2013-10-
|
15
|
+
date: 2013-10-14 00:00:00.000000000 Z
|
16
16
|
dependencies: []
|
17
17
|
description: ! '== Description
|
18
18
|
|