Remove template

This commit is contained in:
DD 2017-12-12 12:23:02 -05:00
parent accdbb0fc3
commit e9392d4b2b
2 changed files with 4 additions and 0 deletions

View file

@ -11,6 +11,7 @@ import {isGroupChild} from './group';
* @return {paper.Item} the hovered item or null if there is none
*/
const getHoveredItem = function (event, hitOptions, subselect) {
// @todo make hit test only hit painting layer
const hitResults = paper.project.hitTestAll(event.point, hitOptions);
if (hitResults.length === 0) {
return null;

View file

@ -154,6 +154,7 @@ class BoundingBoxTool {
this.boundsPath.strokeWidth = 1 / paper.view.zoom;
this.boundsPath.strokeColor = getGuideColor();
// Make a template to copy
const boundsScaleCircleShadow =
new paper.Path.Circle({
center: new paper.Point(0, 0),
@ -223,6 +224,8 @@ class BoundingBoxTool {
noHover: true
};
}
// Remove the template
boundsScaleHandle.remove();
}
removeBoundsPath () {
removeBoundsPath();