diff --git a/src/components/fabric/QPolygon.js b/src/components/fabric/QPolygon.js index ce4d93c7..aff3f1e0 100644 --- a/src/components/fabric/QPolygon.js +++ b/src/components/fabric/QPolygon.js @@ -131,10 +131,9 @@ export const QPolygon = fabric.util.createClass(fabric.Polygon, { this.on('selected', () => { Object.keys(this.controls).forEach((controlKey) => { - if (controlKey !== 'ml' && controlKey !== 'mr') { - this.setControlVisible(controlKey, false) - } + this.setControlVisible(controlKey, false) }) + this.set({ hasBorders: false }) }) this.on('removed', () => { @@ -191,7 +190,12 @@ export const QPolygon = fabric.util.createClass(fabric.Polygon, { line.endPoint = nextPoint this.lines.push(line) }) - // } + }, + + containsPoint: function (point) { + const isInside = this.inPolygon(point) + this.set('selectable', isInside) + return isInside }, // 보조선 그리기