修改代码

This commit is contained in:
ival 2021-04-04 20:34:50 +08:00
parent 333fe16661
commit 5870a3814c
2 changed files with 23 additions and 4 deletions

View File

@ -11,9 +11,28 @@ class Compose extends AbstractShape {
}
create() {
const that = this;
// mouse进入事件
function onmouseover(e) {
that.shapeFactory.trigger(shapeEvent.ShowTips, e, 'text for test');
}
// mouse移动事件
function onmousemove(e) {
onmouseover(e);
}
// mouse离开事件
function onmouseout(e) {
that.shapeFactory.trigger(shapeEvent.HideTips, e);
}
this.instance = new Group({
...shapeRender,
...this.model
...this.model,
onmouseover,
onmousemove,
onmouseout
});
this.model.elementCodes.forEach(code => {

View File

@ -33,9 +33,9 @@ class Element extends AbstractShape {
this.instance = new elementBuilder({
...shapeRender,
...this.model,
onmouseover,
onmousemove,
onmouseout
// onmouseover,
// onmousemove,
// onmouseout
});
this.instance.scale = this.model.scale;