Skip to content

Commit 91d53e7

Browse files
authored
dxDiagram - fix bubble mousedown events, scrollbar (T1305123, T1304998) (#31146)
1 parent 70fca55 commit 91d53e7

File tree

3 files changed

+16
-21
lines changed

3 files changed

+16
-21
lines changed

packages/devextreme/js/ui/diagram/ui.diagram.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ const DIAGRAM_FLOATING_TOOLBAR_CONTAINER_CLASS = DIAGRAM_CLASS + '-floating-tool
4747
const DIAGRAM_PROPERTIES_PANEL_TOOLBAR_CONTAINER_CLASS = DIAGRAM_CLASS + '-properties-panel-toolbar-container';
4848
const DIAGRAM_LOADING_INDICATOR_CLASS = DIAGRAM_CLASS + '-loading-indicator';
4949
const DIAGRAM_FLOATING_PANEL_OFFSET = 12;
50+
const DIAGRAM_PROPERTIES_PANEL_NS_OFFSET = 16;
5051

5152
const DIAGRAM_DEFAULT_UNIT = 'in';
5253
const DIAGRAM_DEFAULT_ZOOMLEVEL = 1;
@@ -474,21 +475,22 @@ class Diagram extends Widget {
474475
}
475476
_updatePropertiesToolbarPosition($container, $parent, isServerSide) {
476477
if(isServerSide) return;
477-
478+
const offset = this.option('useNativeScrolling') ? DIAGRAM_PROPERTIES_PANEL_NS_OFFSET : DIAGRAM_FLOATING_PANEL_OFFSET;
478479
positionUtils.setup($container, {
479480
my: 'right bottom',
480481
at: 'right bottom',
481482
of: $parent,
482-
offset: '-' + DIAGRAM_FLOATING_PANEL_OFFSET + ' -' + DIAGRAM_FLOATING_PANEL_OFFSET
483+
offset: `-${offset}px -${offset}px`
483484
});
484485
}
485486
_renderPropertiesPanel($parent) {
486487
const isServerSide = !hasWindow();
487488
const $propertiesPanel = $('<div>')
488489
.appendTo($parent);
489490

490-
const offsetX = DIAGRAM_FLOATING_PANEL_OFFSET;
491-
const offsetY = 2 * DIAGRAM_FLOATING_PANEL_OFFSET + (!isServerSide ? getOuterHeight(this._propertiesToolbar.$element()) : 0);
491+
const offset = this.option('useNativeScrolling') ? DIAGRAM_PROPERTIES_PANEL_NS_OFFSET : DIAGRAM_FLOATING_PANEL_OFFSET;
492+
const offsetX = offset;
493+
const offsetY = 2 * offset + (!isServerSide ? getOuterHeight(this._propertiesToolbar.$element()) : 0);
492494
this._propertiesPanel = this._createComponent($propertiesPanel, DiagramPropertiesPanel, {
493495
isMobileView: this.isMobileScreenSize(),
494496
isVisible: this._isPropertiesPanelVisible(),

pnpm-lock.yaml

Lines changed: 9 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pnpm-workspace.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ catalog:
99
inferno-hydrate: ^8.2.3
1010
inferno-create-element: ^8.2.3
1111
inferno-server: ^8.2.3
12-
devexpress-diagram: 2.2.21
12+
devexpress-diagram: 2.2.24
1313
devexpress-gantt: 4.1.64
1414
devextreme-quill: 1.7.4
1515
eslint: 9.18.0

0 commit comments

Comments
 (0)