Compare commits
2 Commits
v2.0.6-bet
...
v2.0.6-bet
Author | SHA1 | Date | |
---|---|---|---|
8a226bbf5d | |||
5ae78077e2 |
@ -1,5 +1,5 @@
|
||||
{
|
||||
"version": "2.0.6-beta.22",
|
||||
"version": "2.0.6-beta.24",
|
||||
"npmClient": "yarn",
|
||||
"useWorkspaces": true,
|
||||
"command": {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@antv/x6-plugin-selection",
|
||||
"version": "2.0.6-beta.22",
|
||||
"version": "2.0.6-beta.24",
|
||||
"description": "selection plugin for X6.",
|
||||
"main": "lib/index.js",
|
||||
"module": "es/index.js",
|
||||
|
@ -121,25 +121,14 @@ export class SelectionImpl extends View<SelectionImpl.EventArgs> {
|
||||
const { showNodeSelectionBox, pointerEvents } = this.options
|
||||
const { ui, selection, translateBy, snapped } = options
|
||||
|
||||
let allowTranslating = !this.translating
|
||||
const allowTranslating =
|
||||
(showNodeSelectionBox !== true || pointerEvents === 'none') &&
|
||||
!this.translating &&
|
||||
!selection
|
||||
|
||||
/* Scenarios where this method is not called:
|
||||
* 1. ShowNodeSelection is true or ponterEvents is none
|
||||
* 2. Avoid circular calls with the selection tag
|
||||
*/
|
||||
allowTranslating =
|
||||
allowTranslating &&
|
||||
(showNodeSelectionBox !== true || pointerEvents === 'none')
|
||||
allowTranslating = allowTranslating && ui && !selection
|
||||
const translateByUi = ui && translateBy && node.id === translateBy
|
||||
|
||||
// Avoid circular calls of child nodes
|
||||
allowTranslating =
|
||||
allowTranslating && translateBy && node.id === translateBy
|
||||
|
||||
// enabled when snapline snapped
|
||||
allowTranslating = allowTranslating || snapped
|
||||
|
||||
if (allowTranslating) {
|
||||
if (allowTranslating && (translateByUi || snapped)) {
|
||||
this.translating = true
|
||||
const current = node.position()
|
||||
const previous = node.previous('position')!
|
||||
|
Reference in New Issue
Block a user