Commit f4a047a4 authored by rockyl's avatar rockyl

修改rotate属性为rotation

parent a8f6f07e
......@@ -5,8 +5,9 @@
class ZoomButton {
static name = 'ZoomButton';
mounted(){
console.log('mounted', this.duration);
zoomTo = 1.1;
mounted() {
this.host.anchorX = this.host.width / 2;
this.host.anchorY = this.host.height / 2;
......@@ -14,28 +15,11 @@ class ZoomButton {
this.host.addEventListener(engine.MouseEvent.MOUSE_UP, this._onMouseUp, this);
}
destroy(){
console.log('destroy');
}
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;
_onMouseDown(e) {
this.host.scaleX = this.host.scaleY = this.zoomTo;
}
_onMouseUp(e){
_onMouseUp(e) {
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