prosemirror-tables
Advanced tools
Comparing version 0.0.3 to 0.1.0
@@ -54,5 +54,5 @@ // This file defines a ProseMirror selection subclass that models | ||
var tableChanged = this.$anchorCell.node(-1) != $anchorCell.node(-1) | ||
if (tableChanged && this.isColSelection()) | ||
if (tableChanged && this.isRowSelection()) | ||
{ return CellSelection.colSelection($anchorCell, $headCell) } | ||
else if (tableChanged && this.isRowSelection()) | ||
else if (tableChanged && this.isColSelection()) | ||
{ return CellSelection.rowSelection($anchorCell, $headCell) } | ||
@@ -124,5 +124,5 @@ else | ||
// :: () → bool | ||
// True if this selection goes all the way from the left to the | ||
// right of the table. | ||
CellSelection.prototype.isRowSelection = function isRowSelection () { | ||
// True if this selection goes all the way from the top to the | ||
// bottom of the table. | ||
CellSelection.prototype.isColSelection = function isColSelection () { | ||
var anchorTop = this.$anchorCell.index(-1), headTop = this.$headCell.index(-1) | ||
@@ -159,5 +159,5 @@ if (Math.min(anchorTop, headTop) > 0) { return false } | ||
// :: () → bool | ||
// True if this selection goes all the way from the top to the | ||
// bottom of the table. | ||
CellSelection.prototype.isColSelection = function isColSelection () { | ||
// True if this selection goes all the way from the left to the | ||
// right of the table. | ||
CellSelection.prototype.isRowSelection = function isRowSelection () { | ||
var map = TableMap.get(this.$anchorCell.node(-1)), start = this.$anchorCell.start(-1) | ||
@@ -164,0 +164,0 @@ var anchorLeft = map.colCount(this.$anchorCell.pos - start), |
{ | ||
"name": "prosemirror-tables", | ||
"version": "0.0.3", | ||
"version": "0.1.0", | ||
"description": "ProseMirror's rowspan/colspan tables component", | ||
@@ -22,7 +22,7 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"prosemirror-keymap": "^0.21.0", | ||
"prosemirror-model": "^0.21.0", | ||
"prosemirror-state": "^0.21.0", | ||
"prosemirror-transform": "^0.21.0", | ||
"prosemirror-view": "^0.21.0" | ||
"prosemirror-keymap": "^0.22.0", | ||
"prosemirror-model": "^0.22.0", | ||
"prosemirror-state": "^0.22.0", | ||
"prosemirror-transform": "^0.22.0", | ||
"prosemirror-view": "^0.22.0" | ||
}, | ||
@@ -33,7 +33,7 @@ "devDependencies": { | ||
"mocha": "^3.4.2", | ||
"prosemirror-commands": "^0.21.0", | ||
"prosemirror-example-setup": "^0.21.0", | ||
"prosemirror-menu": "^0.21.0", | ||
"prosemirror-schema-basic": "^0.21.0", | ||
"prosemirror-test-builder": "^0.21.0", | ||
"prosemirror-commands": "^0.22.0", | ||
"prosemirror-example-setup": "^0.22.0", | ||
"prosemirror-menu": "^0.22.0", | ||
"prosemirror-schema-basic": "^0.22.0", | ||
"prosemirror-test-builder": "^0.22.0", | ||
"rimraf": "^2.6.1", | ||
@@ -50,5 +50,5 @@ "rollup": "^0.41.0", | ||
"build": "rimraf dist && buble -i src -o dist", | ||
"prepublish": "npm run build", | ||
"prepare": "npm run build", | ||
"watch": "rollup -w -c" | ||
} | ||
} |
@@ -41,5 +41,5 @@ // This file defines a ProseMirror selection subclass that models | ||
let tableChanged = this.$anchorCell.node(-1) != $anchorCell.node(-1) | ||
if (tableChanged && this.isColSelection()) | ||
if (tableChanged && this.isRowSelection()) | ||
return CellSelection.colSelection($anchorCell, $headCell) | ||
else if (tableChanged && this.isRowSelection()) | ||
else if (tableChanged && this.isColSelection()) | ||
return CellSelection.rowSelection($anchorCell, $headCell) | ||
@@ -106,5 +106,5 @@ else | ||
// :: () → bool | ||
// True if this selection goes all the way from the left to the | ||
// right of the table. | ||
isRowSelection() { | ||
// True if this selection goes all the way from the top to the | ||
// bottom of the table. | ||
isColSelection() { | ||
let anchorTop = this.$anchorCell.index(-1), headTop = this.$headCell.index(-1) | ||
@@ -139,5 +139,5 @@ if (Math.min(anchorTop, headTop) > 0) return false | ||
// :: () → bool | ||
// True if this selection goes all the way from the top to the | ||
// bottom of the table. | ||
isColSelection() { | ||
// True if this selection goes all the way from the left to the | ||
// right of the table. | ||
isRowSelection() { | ||
let map = TableMap.get(this.$anchorCell.node(-1)), start = this.$anchorCell.start(-1) | ||
@@ -144,0 +144,0 @@ let anchorLeft = map.colCount(this.$anchorCell.pos - start), |
Sorry, the diff of this file is too big to display
785926
18439
+ Addedprosemirror-keymap@0.22.1(transitive)
+ Addedprosemirror-model@0.22.0(transitive)
+ Addedprosemirror-state@0.22.0(transitive)
+ Addedprosemirror-transform@0.22.2(transitive)
+ Addedprosemirror-view@0.22.1(transitive)
- Removedprosemirror-keymap@0.21.0(transitive)
- Removedprosemirror-model@0.21.0(transitive)
- Removedprosemirror-state@0.21.0(transitive)
- Removedprosemirror-transform@0.21.1(transitive)
- Removedprosemirror-view@0.21.2(transitive)
Updatedprosemirror-keymap@^0.22.0
Updatedprosemirror-model@^0.22.0
Updatedprosemirror-state@^0.22.0
Updatedprosemirror-view@^0.22.0