dmn-js-drd
Advanced tools
Comparing version 10.0.0 to 10.1.0-alpha.0
@@ -23,2 +23,3 @@ import inherits from 'inherits'; | ||
var lassoTool = injector.get('lassoTool', false); | ||
var handTool = injector.get('handTool', false); | ||
var directEditing = injector.get('directEditing', false); | ||
@@ -69,2 +70,8 @@ var distributeElements = injector.get('distributeElements', false); | ||
if (handTool) { | ||
this._registerAction('handTool', function () { | ||
handTool.toggle(); | ||
}); | ||
} | ||
if (selection && directEditing) { | ||
@@ -71,0 +78,0 @@ this._registerAction('directEditing', function () { |
@@ -62,2 +62,16 @@ import inherits from 'inherits'; | ||
} | ||
}); // activate hand tool | ||
// H | ||
addListener('handTool', function (context) { | ||
var event = context.keyEvent; | ||
if (keyboard.hasModifier(event)) { | ||
return; | ||
} | ||
if (keyboard.isKey(['h', 'H'], event)) { | ||
editorActions.trigger('handTool'); | ||
return true; | ||
} | ||
}); // activate direct editing | ||
@@ -64,0 +78,0 @@ // E |
@@ -99,2 +99,7 @@ import { assign } from 'min-dash'; | ||
newTargetBo = newTarget.businessObject; | ||
if (is(connectionBo, 'dmn:Association')) { | ||
return; | ||
} | ||
self.updateSemanticParent(connectionBo, newTargetBo); | ||
@@ -107,2 +112,7 @@ }, true); | ||
oldTargetBo = oldTarget.businessObject; | ||
if (is(connectionBo, 'dmn:Association')) { | ||
return; | ||
} | ||
self.updateSemanticParent(connectionBo, oldTargetBo); | ||
@@ -109,0 +119,0 @@ }, true); |
@@ -5,5 +5,6 @@ import DiagramTranslate from 'diagram-js/lib/i18n/translate'; | ||
import DiagramLasso from 'diagram-js/lib/features/lasso-tool'; | ||
import DiagramHand from 'diagram-js/lib/features/hand-tool'; | ||
import PaletteProvider from './PaletteProvider'; | ||
export default { | ||
__depends__: [DiagramTranslate, DiagramPalette, DiagramCreate, DiagramLasso], | ||
__depends__: [DiagramTranslate, DiagramPalette, DiagramCreate, DiagramLasso, DiagramHand], | ||
__init__: ['paletteProvider'], | ||
@@ -10,0 +11,0 @@ paletteProvider: ['type', PaletteProvider] |
@@ -6,6 +6,7 @@ import { assign } from 'min-dash'; | ||
export default function PaletteProvider(palette, create, elementFactory, lassoTool, translate) { | ||
export default function PaletteProvider(palette, create, elementFactory, handTool, lassoTool, translate) { | ||
this._palette = palette; | ||
this._create = create; | ||
this._elementFactory = elementFactory; | ||
this._handTool = handTool; | ||
this._lassoTool = lassoTool; | ||
@@ -15,3 +16,3 @@ this._translate = translate; | ||
} | ||
PaletteProvider.$inject = ['palette', 'create', 'elementFactory', 'lassoTool', 'translate']; | ||
PaletteProvider.$inject = ['palette', 'create', 'elementFactory', 'handTool', 'lassoTool', 'translate']; | ||
@@ -22,2 +23,3 @@ PaletteProvider.prototype.getPaletteEntries = function (element) { | ||
elementFactory = this._elementFactory, | ||
handTool = this._handTool, | ||
lassoTool = this._lassoTool, | ||
@@ -46,2 +48,12 @@ translate = this._translate; | ||
assign(actions, { | ||
'hand-tool': { | ||
group: 'tools', | ||
className: 'dmn-icon-hand-tool', | ||
title: translate('Activate the hand tool'), | ||
action: { | ||
click: function click(event) { | ||
handTool.activateHand(event); | ||
} | ||
} | ||
}, | ||
'lasso-tool': { | ||
@@ -48,0 +60,0 @@ group: 'tools', |
{ | ||
"name": "dmn-js-drd", | ||
"description": "A decision requirements diagram view for dmn-js", | ||
"version": "10.0.0", | ||
"version": "10.1.0-alpha.0", | ||
"scripts": { | ||
@@ -25,5 +25,5 @@ "test": "karma start", | ||
"dependencies": { | ||
"diagram-js": "^7.0.0", | ||
"diagram-js": "^7.2.0", | ||
"diagram-js-direct-editing": "^1.6.2", | ||
"dmn-js-shared": "^10.0.0", | ||
"dmn-js-shared": "^10.1.0-alpha.0", | ||
"inherits": "^2.0.1", | ||
@@ -36,5 +36,5 @@ "min-dash": "^3.5.2", | ||
"devDependencies": { | ||
"dmn-font": "^0.5.0" | ||
"dmn-font": "^0.6.0" | ||
}, | ||
"gitHead": "ce4f81d527c4eeadb0507d644d3927a0268bb665" | ||
"gitHead": "23e5552f74f6954e5815c9258a1f0a245175d80d" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
425624
3853
2
Updateddiagram-js@^7.2.0