Source: control2/bubble/BubbleArrow.js

(function() {
    /**
     * @typedef {Help4.control2.Control.Params} Help4.control2.bubble.BubbleArrow.Params
     * @property {Help4.control2.bubble.Bubble} bubble - the corresponding bubble control
     */

    /**
     * Draws the arrow for a bubble
     * @augments Help4.control2.Control
     */
    Help4.control2.bubble.BubbleArrow = class extends Help4.control2.Control {
        /**
         * @override
         * @param {Help4.control2.bubble.BubbleArrow.Params} [params]
         */
        constructor(params) {
            params ||= {};

            const {bubble} = params;
            if (!bubble) throw new Error('bubble parameter is required!');

            const {TYPES: T} = Help4.jscore.ControlBase;
            super(params, {
                params: {
                    id:     {init: bubble.id + '-arrow'},

                    dom:    {init: bubble.getDom()},
                    bubble: {type: T.instance, init: bubble, mandatory: true, private: true}
                },
                config: {
                    css: 'control-bubble-arrow arrow'
                }
            });
        }
    }
})();