Comparing version 1.0.0-8 to 1.0.0
@@ -177,7 +177,8 @@ | ||
if (position.x + (position.width / 2) > (containerBounds.width + scrollLeft) / 2) { | ||
if (position.x + (position.width / 2) > containerBounds.width / 2) { | ||
contextMenuPosition.left = | ||
(position.x | ||
- containerBounds.left | ||
- bounds.width) | ||
- bounds.width | ||
+ scrollLeft) | ||
+ 'px'; | ||
@@ -189,11 +190,13 @@ } else { | ||
+ position.x | ||
+ position.width) | ||
+ position.width | ||
+ scrollLeft) | ||
+ 'px'; | ||
} | ||
if (position.y + (position.height / 2) > (containerBounds.height + scrollTop) / 2) { | ||
if (position.y + (position.height / 2) > containerBounds.height / 2) { | ||
contextMenuPosition.top = | ||
(position.y | ||
- containerBounds.top | ||
- bounds.height) | ||
- bounds.height | ||
+ scrollTop) | ||
+ 'px'; | ||
@@ -204,3 +207,4 @@ } else { | ||
- containerBounds.top | ||
+ position.y) | ||
+ position.y | ||
+ scrollTop) | ||
+ 'px'; | ||
@@ -207,0 +211,0 @@ } |
@@ -13,2 +13,3 @@ import isString from 'lodash/isString'; | ||
this._elementRegistry = elementRegistry; | ||
this._eventBus = eventBus; | ||
this._renderer = renderer; | ||
@@ -39,5 +40,12 @@ | ||
} | ||
const oldSelection = this._selection; | ||
this._selection = element; | ||
this._eventBus.fire('selection.changed', { | ||
oldSelection, | ||
selection: this._selection | ||
}); | ||
const container = this._renderer.getContainer(); | ||
@@ -65,4 +73,11 @@ | ||
} | ||
const oldSelection = this._selection; | ||
this._selection = undefined; | ||
this._eventBus.fire('selection.changed', { | ||
oldSelection, | ||
selection: this._selection | ||
}); | ||
} | ||
@@ -79,2 +94,9 @@ } | ||
/** | ||
* Check if a cell is selected. | ||
*/ | ||
hasSelection() { | ||
return !!this._selection; | ||
} | ||
/** | ||
* Freeze selection so it can not change. | ||
@@ -81,0 +103,0 @@ */ |
{ | ||
"name": "table-js", | ||
"version": "1.0.0-8", | ||
"version": "1.0.0", | ||
"scripts": { | ||
@@ -5,0 +5,0 @@ "all": "npm run lint && npm run test", |
@@ -35,4 +35,10 @@ # table-js | ||
### Package | ||
Execute npm run all to lint and test the project. | ||
Note: We do not generate any build artifacts. Required parts of the library should be bundled by modelers / viewers as needed instead. | ||
## License | ||
MIT |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
683575
12945
1
43