prosemirror-transform
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -0,1 +1,7 @@ | ||
## 1.1.1 (2018-06-26) | ||
### Bug fixes | ||
Fix issues in the new [`dropPoint`](https://prosemirror.net/docs/ref/#transform.dropPoint) function. | ||
## 1.1.0 (2018-06-20) | ||
@@ -2,0 +8,0 @@ |
{ | ||
"name": "prosemirror-transform", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "ProseMirror document transformations", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -55,1 +55,2 @@ This module defines a way of modifying documents that allows changes | ||
@insertPoint | ||
@dropPoint |
@@ -273,3 +273,3 @@ import {Slice, Fragment} from "prosemirror-model" | ||
for (let i = 0; i < slice.openStart; i++) content = content.firstChild.content | ||
for (let pass = 1; pass <= (slice.openStart == 0 && slice.length ? 2 : 1); pass++) { | ||
for (let pass = 1; pass <= (slice.openStart == 0 && slice.size ? 2 : 1); pass++) { | ||
for (let d = $pos.depth; d >= 0; d--) { | ||
@@ -280,3 +280,3 @@ let bias = d == $pos.depth ? 0 : $pos.pos <= ($pos.start(d + 1) + $pos.end(d + 1)) / 2 ? -1 : 1 | ||
? $pos.node(d).canReplace(insertPos, insertPos, content) | ||
: $pos.node(d).contentMatchAt(insertPos).findWrapping(content.firstChild)) | ||
: $pos.node(d).contentMatchAt(insertPos).findWrapping(content.firstChild.type)) | ||
return bias == 0 ? $pos.pos : bias < 0 ? $pos.before(d + 1) : $pos.after(d + 1) | ||
@@ -283,0 +283,0 @@ } |
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
283974