parent
0507cfcdcb
commit
2a90e7c787
@ -53,10 +53,11 @@ export default {
|
||||
tween: null,
|
||||
is_opening: false,
|
||||
is_closing: false,
|
||||
is_hover: false,
|
||||
//
|
||||
body: null,
|
||||
body_parts: [],
|
||||
constraint: null,
|
||||
is_hover: false,
|
||||
//
|
||||
paper_main_object: {},
|
||||
paper_groups: {}
|
||||
@ -1067,6 +1068,8 @@ export default {
|
||||
if (this.is_hover) {
|
||||
this.paper_main_object.children['contours'].strokeColor = "#01ffe2";
|
||||
this.paper_main_object.children['contours'].strokeWidth = 2;
|
||||
|
||||
|
||||
}else{
|
||||
this.paper_main_object.children['contours'].strokeColor = "#fff";
|
||||
this.paper_main_object.children['contours'].strokeWidth = 1;
|
||||
@ -1720,8 +1723,13 @@ export default {
|
||||
onAfterEngineUpdate (event) {
|
||||
this.respawn();
|
||||
|
||||
if (this.is_hover) { // if mouse hover reset the matter body position to prev position
|
||||
Matter.Body.setPosition(this.body, {x:this.pos.x, y:this.pos.y}, true);
|
||||
}
|
||||
|
||||
this.paper_main_object.position = this.pos = this.body.position;
|
||||
|
||||
|
||||
this.handlePaperVisibilityOnAfterEnginUpdate()
|
||||
},
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user