| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 743a2ef commit 5129516
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -226,6 +226,10 @@ export class Animation extends common.Animation implements definition.Animation | |||
| 226 | 226 | let tempRotate = animation.target.rotate * Math.PI / 180; | |
| 227 | 227 | let abs; | |
| 228 | 228 | ||
| 229 | + if (valueSource === undefined) { | ||
| 230 | + valueSource = dependencyObservable.ValueSource.Local; | ||
| 231 | + } | ||
| 232 | + | ||
| 229 | 233 | switch (animation.property) { | |
| 230 | 234 | case common.Properties.backgroundColor: | |
| 231 | 235 | animation._originalValue = animation.target.backgroundColor; | |
@@ -243,6 +247,7 @@ export class Animation extends common.Animation implements definition.Animation | |||
| 243 | 247 | nativeView.setValueForKey(UIColor.clearColor(), "backgroundColor"); | |
| 244 | 248 | } | |
| 245 | 249 | value = value.CGColor; | |
| 250 | + animation.target.style._setValue(style.backgroundColorProperty, animation.target.backgroundColor, valueSource); | ||
| 246 | 251 | break; | |
| 247 | 252 | case common.Properties.opacity: | |
| 248 | 253 | animation._originalValue = animation.target.opacity; | |
@@ -255,6 +260,7 @@ export class Animation extends common.Animation implements definition.Animation | |||
| 255 | 260 | else { | |
| 256 | 261 | originalValue = nativeView.layer.opacity; | |
| 257 | 262 | } | |
| 263 | + animation.target.style._setValue(style.opacityProperty, animation.target.opacity, valueSource); | ||
| 258 | 264 | break; | |
| 259 | 265 | case common.Properties.rotate: | |
| 260 | 266 | animation._originalValue = animation.target.rotate; | |
@@ -276,6 +282,7 @@ export class Animation extends common.Animation implements definition.Animation | |||
| 276 | 282 | if (abs < 0.001 && originalValue !== tempRotate) { | |
| 277 | 283 | originalValue = tempRotate; | |
| 278 | 284 | } | |
| 285 | + animation.target.style._setValue(style.rotateProperty, animation.target.rotate, valueSource); | ||
| 279 | 286 | break; | |
| 280 | 287 | case common.Properties.translate: | |
| 281 | 288 | animation._originalValue = { x: animation.target.translateX, y: animation.target.translateY }; | |
@@ -291,6 +298,8 @@ export class Animation extends common.Animation implements definition.Animation | |||
| 291 | 298 | originalValue = NSValue.valueWithCATransform3D(nativeView.layer.transform); | |
| 292 | 299 | } | |
| 293 | 300 | value = NSValue.valueWithCATransform3D(CATransform3DTranslate(nativeView.layer.transform, value.x, value.y, 0)); | |
| 301 | + animation.target.style._setValue(style.translateXProperty, animation.target.translateX, valueSource); | ||
| 302 | + animation.target.style._setValue(style.translateXProperty, animation.target.translateY, valueSource); | ||
| 294 | 303 | break; | |
| 295 | 304 | case common.Properties.scale: | |
| 296 | 305 | animation._originalValue = { x: animation.target.scaleX, y: animation.target.scaleY }; | |
@@ -306,6 +315,8 @@ export class Animation extends common.Animation implements definition.Animation | |||
| 306 | 315 | originalValue = NSValue.valueWithCATransform3D(nativeView.layer.transform); | |
| 307 | 316 | } | |
| 308 | 317 | value = NSValue.valueWithCATransform3D(CATransform3DScale(nativeView.layer.transform, value.x, value.y, 1)); | |
| 318 | + animation.target.style._setValue(style.scaleXProperty, animation.target.scaleX, valueSource); | ||
| 319 | + animation.target.style._setValue(style.scaleYProperty, animation.target.scaleY, valueSource); | ||
| 309 | 320 | break; | |
| 310 | 321 | case _transform: | |
| 311 | 322 | if (presentationLayer != null && valueSource !== dependencyObservable.ValueSource.Css) { | |
@@ -324,6 +335,10 @@ export class Animation extends common.Animation implements definition.Animation | |||
| 324 | 335 | }; | |
| 325 | 336 | propertyNameToAnimate = "transform"; | |
| 326 | 337 | value = NSValue.valueWithCATransform3D(Animation._createNativeAffineTransform(animation)); | |
| 338 | + animation.target.style._setValue(style.scaleXProperty, animation.target.scaleX, valueSource); | ||
| 339 | + animation.target.style._setValue(style.scaleYProperty, animation.target.scaleY, valueSource); | ||
| 340 | + animation.target.style._setValue(style.translateXProperty, animation.target.translateX, valueSource); | ||
| 341 | + animation.target.style._setValue(style.translateYProperty, animation.target.translateY, valueSource); | ||
| 327 | 342 | break; | |
| 328 | 343 | default: | |
| 329 | 344 | throw new Error("Cannot animate " + animation.property); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments