Source
return this.#target.dispatchEvent(new CustomEvent(type, {options, detail: {target: this, detail}}));
/*
** Copyright (C) 2001-2025 Zabbix SIA
**
** This program is free software: you can redistribute it and/or modify it under the terms of
** the GNU Affero General Public License as published by the Free Software Foundation, version 3.
**
** This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
** without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
** See the GNU Affero General Public License for more details.
**
** You should have received a copy of the GNU Affero General Public License along with this program.
** If not, see <https://www.gnu.org/licenses/>.
**/
/**
* New widget placeholder class.
*/
class CDashboardWidgetPlaceholder {
static ZBX_STYLE_CLASS = 'dashboard-widget-placeholder';
static ZBX_STYLE_BOX = 'dashboard-widget-placeholder-box';
static ZBX_STYLE_LABEL = 'dashboard-widget-placeholder-label';
static ZBX_STYLE_RESIZING = 'dashboard-widget-placeholder-resizing';
static STATE_ADD_NEW = 0;
static STATE_RESIZING = 1;
static STATE_POSITIONING = 2;
static EVENT_ADD_NEW_WIDGET = 'widget-placeholder-add-new-widget';
/**
* @type {HTMLDivElement}
*/
#target;
/**
* Dashboard grid cell width in percents.
*
* @type {number}
*/
#cell_width;
/**
* Dashboard grid cell height in pixels.
*
* @type {number}
*/
#cell_height;
/**
* @type {HTMLDivElement}
*/
#placeholder_box;
/**
* @type {HTMLDivElement}
*/
#placeholder_box_label
/**
* @type {HTMLDivElement}
*/