Commit f4a047a4 authored by rockyl's avatar rockyl

修改rotate属性为rotation

parent a8f6f07e
...@@ -5,8 +5,9 @@ ...@@ -5,8 +5,9 @@
class ZoomButton { class ZoomButton {
static name = 'ZoomButton'; static name = 'ZoomButton';
mounted(){ zoomTo = 1.1;
console.log('mounted', this.duration);
mounted() {
this.host.anchorX = this.host.width / 2; this.host.anchorX = this.host.width / 2;
this.host.anchorY = this.host.height / 2; this.host.anchorY = this.host.height / 2;
...@@ -14,28 +15,11 @@ class ZoomButton { ...@@ -14,28 +15,11 @@ class ZoomButton {
this.host.addEventListener(engine.MouseEvent.MOUSE_UP, this._onMouseUp, this); this.host.addEventListener(engine.MouseEvent.MOUSE_UP, this._onMouseUp, this);
} }
destroy(){ _onMouseDown(e) {
console.log('destroy'); this.host.scaleX = this.host.scaleY = this.zoomTo;
}
update(t){
//console.log('update', t);
//this.host.rotation = t * 0.1;
}
awake(){
console.log('awake');
}
sleep(){
console.log('sleep');
}
_onMouseDown(e){
this.host.scaleX = this.host.scaleY = 1.1;
} }
_onMouseUp(e){ _onMouseUp(e) {
this.host.scaleX = this.host.scaleY = 1; this.host.scaleX = this.host.scaleY = 1;
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment