- console.log('up', distance, marker);
- // TODO - Update row/column for distance
+ marker.classList.remove('active');
+ marker.style.left = '0';
+ marker.style.top = '0';
+
+ _this.dragging = false;
+ console.log('up', distance, marker, markerProp, _this.targetCell);
+ const parentTable = _this.targetCell?.closest('table');
+
+ if (markerProp === 'left' && _this.targetCell && parentTable) {
+ const cellIndex = _this.getTargetCellColumnIndex();
+ _this.editor.update(() => {
+ const table = $getNearestNodeFromDOMNode(parentTable);
+ if (table instanceof CustomTableNode) {
+ const originalWidth = $getTableColumnWidth(_this.editor, table, cellIndex);
+ const newWidth = Math.max(originalWidth + distance.x, 10);
+ $setTableColumnWidth(table, cellIndex, newWidth);
+ }
+ });
+ }