prosemirror-tables
Advanced tools
Comparing version 0.7.1 to 0.7.2
{ | ||
"name": "prosemirror-tables", | ||
"version": "0.7.1", | ||
"version": "0.7.2", | ||
"description": "ProseMirror's rowspan/colspan tables component", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -70,5 +70,3 @@ import {Plugin, PluginKey} from "prosemirror-state" | ||
if (pluginState.dragging) { | ||
displayColumnWidth(view, pluginState.activeHandle, draggedWidth(pluginState.dragging, event, cellMinWidth), cellMinWidth) | ||
} else { | ||
if (!pluginState.dragging) { | ||
let target = domCellAround(event.target), cell = -1 | ||
@@ -87,3 +85,4 @@ if (target) { | ||
function handleMouseLeave(view) { | ||
if (key.getState(view.state).activeHandle > -1) updateHandle(view, -1) | ||
let pluginState = key.getState(view.state) | ||
if (pluginState.activeHandle > -1 && !pluginState.dragging) updateHandle(view, -1) | ||
} | ||
@@ -108,3 +107,8 @@ | ||
} | ||
function move(event) { if (!event.which) finish(event) } | ||
function move(event) { | ||
if (!event.which) return finish(event) | ||
let pluginState = key.getState(view.state) | ||
let dragged = draggedWidth(pluginState.dragging, event, cellMinWidth) | ||
displayColumnWidth(view, pluginState.activeHandle, dragged, cellMinWidth) | ||
} | ||
@@ -111,0 +115,0 @@ window.addEventListener("mouseup", finish) |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
343465
3841