X-Git-Url: https://git.r.bdr.sh/rbdr/canvas/blobdiff_plain/d7cea96940ddeb764c7343e05526f611863019d8..e4e4b5202bf0039127f591941fddc1ff5ca09897:/src/lib/stores/widgets.js diff --git a/src/lib/stores/widgets.js b/src/lib/stores/widgets.js index 4da94ff..9bdb649 100644 --- a/src/lib/stores/widgets.js +++ b/src/lib/stores/widgets.js @@ -13,17 +13,12 @@ const getBoxes = function getBoxes ({left, top, right, bottom}) { `box.ov."((${left},${top}),(${right},${bottom}))"`, `box.ov."((${left+maxSize},${top+maxSize}),(${right+maxSize},${bottom+maxSize}))"`, `box.ov."((${left+maxSize},${top}),(${right+maxSize},${bottom}))"`, - `box.ov."((${left},${top+maxSize}),(${right},${bottom+maxSize}))"` + `box.ov."((${left},${top+maxSize}),(${right},${bottom+maxSize}))"`, + `box.ov."((${left-maxSize},${top-maxSize}),(${right-maxSize},${bottom-maxSize}))"`, + `box.ov."((${left-maxSize},${top}),(${right-maxSize},${bottom}))"`, + `box.ov."((${left},${top-maxSize}),(${right},${bottom-maxSize}))"` ]; - if (right > maxSize || bottom > maxSize) { - return [...results, - `box.ov."((${left-maxSize},${top-maxSize}),(${right-maxSize},${bottom-maxSize}))"`, - `box.ov."((${left-maxSize},${top}),(${right-maxSize},${bottom}))"`, - `box.ov."((${left},${top-maxSize}),(${right},${bottom-maxSize}))"` - ]; - } - return results };