Browse Source

UI: Fixed select widget in touch screen

pull/11730/head
Vladyslav_Prykhodko 2 years ago
parent
commit
c8a39f979d
  1. 21
      ui-ngx/src/app/modules/home/components/widget/widget-container.component.ts

21
ui-ngx/src/app/modules/home/components/widget/widget-container.component.ts

@ -200,6 +200,9 @@ export class WidgetContainerComponent extends PageComponent implements OnInit, O
} }
onMouseDown(event: MouseEvent) { onMouseDown(event: MouseEvent) {
if (event) {
event.stopPropagation();
}
this.widgetComponentAction.emit({ this.widgetComponentAction.emit({
event, event,
actionType: WidgetComponentActionType.MOUSE_DOWN actionType: WidgetComponentActionType.MOUSE_DOWN
@ -207,6 +210,9 @@ export class WidgetContainerComponent extends PageComponent implements OnInit, O
} }
onClicked(event: MouseEvent) { onClicked(event: MouseEvent) {
if (event) {
event.stopPropagation();
}
this.widgetComponentAction.emit({ this.widgetComponentAction.emit({
event, event,
actionType: WidgetComponentActionType.CLICKED actionType: WidgetComponentActionType.CLICKED
@ -214,6 +220,9 @@ export class WidgetContainerComponent extends PageComponent implements OnInit, O
} }
onContextMenu(event: MouseEvent) { onContextMenu(event: MouseEvent) {
if (event) {
event.stopPropagation();
}
this.widgetComponentAction.emit({ this.widgetComponentAction.emit({
event, event,
actionType: WidgetComponentActionType.CONTEXT_MENU actionType: WidgetComponentActionType.CONTEXT_MENU
@ -221,6 +230,9 @@ export class WidgetContainerComponent extends PageComponent implements OnInit, O
} }
onEdit(event: MouseEvent) { onEdit(event: MouseEvent) {
if (event) {
event.stopPropagation();
}
this.widgetComponentAction.emit({ this.widgetComponentAction.emit({
event, event,
actionType: WidgetComponentActionType.EDIT actionType: WidgetComponentActionType.EDIT
@ -228,6 +240,9 @@ export class WidgetContainerComponent extends PageComponent implements OnInit, O
} }
onReplaceReferenceWithWidgetCopy(event: MouseEvent) { onReplaceReferenceWithWidgetCopy(event: MouseEvent) {
if (event) {
event.stopPropagation();
}
this.widgetComponentAction.emit({ this.widgetComponentAction.emit({
event, event,
actionType: WidgetComponentActionType.REPLACE_REFERENCE_WITH_WIDGET_COPY actionType: WidgetComponentActionType.REPLACE_REFERENCE_WITH_WIDGET_COPY
@ -235,6 +250,9 @@ export class WidgetContainerComponent extends PageComponent implements OnInit, O
} }
onExport(event: MouseEvent) { onExport(event: MouseEvent) {
if (event) {
event.stopPropagation();
}
this.widgetComponentAction.emit({ this.widgetComponentAction.emit({
event, event,
actionType: WidgetComponentActionType.EXPORT actionType: WidgetComponentActionType.EXPORT
@ -242,6 +260,9 @@ export class WidgetContainerComponent extends PageComponent implements OnInit, O
} }
onRemove(event: MouseEvent) { onRemove(event: MouseEvent) {
if (event) {
event.stopPropagation();
}
this.widgetComponentAction.emit({ this.widgetComponentAction.emit({
event, event,
actionType: WidgetComponentActionType.REMOVE actionType: WidgetComponentActionType.REMOVE

Loading…
Cancel
Save