Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 1 addition & 21 deletions web/libs/editor/src/regions/VectorRegion.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -187,30 +187,15 @@ const Model = types
self.mouseOverStartPoint = value;
},

addPoint() {
// KonvaVector managing vector points internally.
// This method is just a fallback for compatibility
},

setDrawing(drawing) {
self.isDrawing = drawing;
},

checkSizes() {
// This method is called after creation to ensure proper sizing
// For vector regions, we don't need to do anything special here
},

closePoly() {
if (!self.closable) return;
self.vectorRef.close();
},

notifyDrawingFinished() {
// This method is called when drawing is finished
// For vector regions, we don't need to do anything special here
},

onSelection(type) {
if (type === "reset") {
self.vectorRef.clearSelection();
Expand Down Expand Up @@ -443,12 +428,6 @@ const Model = types
self.closed = isClosed;
},

// Method to handle selection changes from the Selection tool
onSelectionChange() {
// This method can be called when the Selection tool changes selection state
// We can add any custom logic here if needed
},

setKonvaVectorRef(ref) {
self.vectorRef = ref;
},
Expand Down Expand Up @@ -538,6 +517,7 @@ const HtxVectorView = observer(({ item, suggestion }) => {
return;
}
// Handle region selection
if (item.isReadOnly()) return;
if (item.parent.getSkipInteractions()) return;
if (item.isDrawing) return;
if (e.evt.altKey || e.evt.ctrlKey || e.evt.shiftKey || e.evt.metaKey) return;
Expand Down
Loading