]> git.r.bdr.sh - rbdr/canvas/blobdiff - src/lib/stores/widgets.js
Update project, improve sensor/render logic
[rbdr/canvas] / src / lib / stores / widgets.js
index 4da94ff1980c012e417f0959c1f61fe64d82af7f..9bdb649f8bbae3dbde4722328589e578ae35142f 100644 (file)
@@ -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
 };