diff --git a/src/iscs_new/core/abstractShape.js b/src/iscs_new/core/abstractShape.js index 5c832e20c..9a3a7802d 100644 --- a/src/iscs_new/core/abstractShape.js +++ b/src/iscs_new/core/abstractShape.js @@ -46,27 +46,18 @@ class AbstractShape extends Group { this.instance.position = this.model.base.position; this.instance.rotation = this.model.base.rotation*Math.PI/180; this.instance.origin = utils.createOrigin(this.instance); - console.log(this.model.base.position, this.model.base.rotation); this.instance.transform = utils.createTransform({scale: this.model.base.scale, position: this.model.base.position, rotation: this.model.base.rotation*Math.PI/180}); this.setInvisible(this.model.base.hide) } // 修改状态 attr(attrs) { - if (this.instance) { - this.instance.attr(attrs); - } else { - super.attr(attrs); - } + this.instance? this.instance.attr(attrs): super.attr(attrs); } // 设置显隐 setInvisible(hide) { - if (hide) { - super.hide() - } else { - super.show(); - } + hide ? super.hide() : super.show(); super.dirty(); } diff --git a/src/iscs_new/selectHandle.js b/src/iscs_new/selectHandle.js index d84096bab..053850903 100644 --- a/src/iscs_new/selectHandle.js +++ b/src/iscs_new/selectHandle.js @@ -1,6 +1,4 @@ import shapeLayer from './constant/shapeLayer'; -import * as graphic from './core/graphic'; - export default class SelectHandle { constructor(map, controller) { this.$map = map; @@ -50,17 +48,6 @@ export default class SelectHandle { }); } - // createSelected(target) { - // if (this.$map.draggle) { - // switch (target.type) { - // case graphic.Line: - // return new LineDraggable(this); - // case graphic.Image: - // return new ImageDraggable(this); - // } - // } - // } - setDraggable(draggable) { const target = this.e.target; if (target &&