UNPKG

@deephaven/golden-layout

Version:

A multi-screen javascript Layout manager

27 lines 1.34 kB
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; } function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } import $ from 'jquery'; export default class DropTargetIndicator { constructor() { _defineProperty(this, "element", $(DropTargetIndicator._template)); $(document.body).append(this.element); } destroy() { this.element.remove(); } highlightArea(area) { this.element.css({ left: area.x1, top: area.y1, // marching ants were causing rendering artifacts with fractional pixels width: Math.floor(area.x2 - area.x1), height: Math.floor(area.y2 - area.y1) }).show(); } hide() { this.element.hide(); } } _defineProperty(DropTargetIndicator, "_template", '<div class="lm_dropTargetIndicator"><div class="lm_inner"></div></div>'); //# sourceMappingURL=DropTargetIndicator.js.map