Merge branch 'master' into fix/4521-gateway-fixes
This commit is contained in:
commit
4b64519731
@ -252,6 +252,7 @@ export class DashboardComponent extends PageComponent implements IDashboardCompo
|
|||||||
},
|
},
|
||||||
draggable: {
|
draggable: {
|
||||||
enabled: this.isEdit && !this.isEditingWidget,
|
enabled: this.isEdit && !this.isEditingWidget,
|
||||||
|
delayStart: 100,
|
||||||
stop: (_, itemComponent) => {(itemComponent.item as DashboardWidget).updatePosition(itemComponent.$item.x, itemComponent.$item.y);}
|
stop: (_, itemComponent) => {(itemComponent.item as DashboardWidget).updatePosition(itemComponent.$item.x, itemComponent.$item.y);}
|
||||||
},
|
},
|
||||||
itemChangeCallback: () => this.dashboardWidgets.sortWidgets(),
|
itemChangeCallback: () => this.dashboardWidgets.sortWidgets(),
|
||||||
|
|||||||
@ -15,7 +15,7 @@
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
|
|
||||||
-->
|
-->
|
||||||
<div class="tb-toggle-button-panel" [style.padding]="padding" [style]="backgroundStyle$ | async">
|
<div class="tb-toggle-button-panel" [class.no-pointer-events]="ctx.isEdit" [style.padding]="padding" [style]="backgroundStyle$ | async">
|
||||||
<div class="tb-toggle-button-overlay" [style]="overlayStyle"></div>
|
<div class="tb-toggle-button-overlay" [style]="overlayStyle"></div>
|
||||||
<ng-container *ngTemplateOutlet="widgetTitlePanel"></ng-container>
|
<ng-container *ngTemplateOutlet="widgetTitlePanel"></ng-container>
|
||||||
<div class="tb-toggle-button-container"
|
<div class="tb-toggle-button-container"
|
||||||
|
|||||||
@ -38,6 +38,12 @@
|
|||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.no-pointer-events {
|
||||||
|
button {
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.tb-toggle-button-container {
|
.tb-toggle-button-container {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
|
|||||||
@ -15,7 +15,7 @@
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
|
|
||||||
-->
|
-->
|
||||||
<div class="tb-slider-panel" [style.pointer-events]="ctx.isEdit ? 'none' : 'all'" [style.padding]="padding" [style]="backgroundStyle$ | async">
|
<div class="tb-slider-panel" [class.no-pointer-events]="ctx.isEdit" [style.padding]="padding" [style]="backgroundStyle$ | async">
|
||||||
<div class="tb-slider-overlay" [style]="overlayStyle"></div>
|
<div class="tb-slider-overlay" [style]="overlayStyle"></div>
|
||||||
<div *ngIf="showWidgetTitlePanel" class="tb-slider-title-panel">
|
<div *ngIf="showWidgetTitlePanel" class="tb-slider-title-panel">
|
||||||
<ng-container *ngTemplateOutlet="widgetTitlePanel"></ng-container>
|
<ng-container *ngTemplateOutlet="widgetTitlePanel"></ng-container>
|
||||||
|
|||||||
@ -65,6 +65,13 @@ $backgroundColorDisabled: var(--tb-slider-background-color-disabled, #D5D7E5);
|
|||||||
div.tb-slider-title-panel {
|
div.tb-slider-title-panel {
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
}
|
}
|
||||||
|
&.no-pointer-events {
|
||||||
|
.mat-mdc-slider.tb-slider {
|
||||||
|
.mdc-slider__input {
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
.tb-slider-content {
|
.tb-slider-content {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
|
|||||||
@ -37,13 +37,13 @@ export const initCustomJQueryEvents = () => {
|
|||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
timeoutId = setTimeout(() => {
|
timeoutId = setTimeout(() => {
|
||||||
timeoutId = null;
|
timeoutId = null;
|
||||||
e.stopPropagation();
|
|
||||||
const touch = e.originalEvent.changedTouches[0];
|
const touch = e.originalEvent.changedTouches[0];
|
||||||
const event = $.Event('tbcontextmenu', {
|
const event = $.Event('tbcontextmenu', {
|
||||||
clientX: touch.clientX,
|
clientX: touch.clientX,
|
||||||
clientY: touch.clientY,
|
clientY: touch.clientY,
|
||||||
ctrlKey: false,
|
ctrlKey: false,
|
||||||
metaKey: false
|
metaKey: false,
|
||||||
|
originalEvent: e
|
||||||
});
|
});
|
||||||
el.trigger(event, e);
|
el.trigger(event, e);
|
||||||
}, 500);
|
}, 500);
|
||||||
@ -56,13 +56,12 @@ export const initCustomJQueryEvents = () => {
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
el.on('contextmenu', (e) => {
|
el.on('contextmenu', (e) => {
|
||||||
e.preventDefault();
|
|
||||||
e.stopPropagation();
|
|
||||||
const event = $.Event('tbcontextmenu', {
|
const event = $.Event('tbcontextmenu', {
|
||||||
clientX: e.originalEvent.clientX,
|
clientX: e.originalEvent.clientX,
|
||||||
clientY: e.originalEvent.clientY,
|
clientY: e.originalEvent.clientY,
|
||||||
ctrlKey: e.originalEvent.ctrlKey,
|
ctrlKey: e.originalEvent.ctrlKey,
|
||||||
metaKey: e.originalEvent.metaKey,
|
metaKey: e.originalEvent.metaKey,
|
||||||
|
originalEvent: e
|
||||||
});
|
});
|
||||||
el.trigger(event, e);
|
el.trigger(event, e);
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user