8000 Fixed a plot range animation bug. · core-plot/core-plot@1a5c661 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1a5c661

Browse files
committed
Fixed a plot range animation bug.
1 parent 77f2e15 commit 1a5c661

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

framework/Source/CPTAnimation.m

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#import "CPTAnimationOperation.h"
44
#import "CPTAnimationPeriod.h"
55
#import "CPTDefinitions.h"
6+
#import "CPTPlotRange.h"
67
#import "_CPTAnimationTimingFunctions.h"
78

89
static const CGFloat kCPTAnimationFrameRate = CPTFloat(1.0 / 60.0); // 60 frames per second
@@ -406,6 +407,13 @@ -(void)updateOnMainThreadWithParameters:(nonnull CPTDictionary *)parameters
406407
SetterType setterMethod = (SetterType)[boundObject methodForSelector:boundSetter];
407408
setterMethod(boundObject, boundSetter, buffer);
408409
}
410+
else if ( [tweenedValue isKindOfClass:[CPTPlotRange class]] ) {
411+
CPTPlotRange *range = (CPTPlotRange *)tweenedValue;
412+
413+
typedef void (*RangeSetterType)(id, SEL, CPTPlotRange *);
414+
RangeSetterType setterMethod = (RangeSetterType)[boundObject methodForSelector:boundSetter];
415+
setterMethod(boundObject, boundSetter, range);
416+
}
409417
else {
410418
// wrapped scalars and structs
411419
NSValue *value = (NSValue *)tweenedValue;

0 commit comments

Comments
 (0)
0