修改代码
This commit is contained in:
parent
333fe16661
commit
5870a3814c
@ -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 => {
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user