MCPcopy Index your code
hub / github.com/gridstack/gridstack.js / placeholder

Method placeholder

src/gridstack.ts:231–240  ·  view source on GitHub ↗

* @internal create placeholder DIV as needed * @returns the placeholder element for indicating drop zones during drag operations

()

Source from the content-addressed store, hash-verified

229 * @returns the placeholder element for indicating drop zones during drag operations
230 */
231 public get placeholder(): GridItemHTMLElement {
232 if (!this._placeholder) {
233 this._placeholder = Utils.createDiv([this.opts.placeholderClass, gridDefaults.itemClass, this.opts.itemClass]);
234 const placeholderChild = Utils.createDiv(['placeholder-content'], this._placeholder);
235 if (this.opts.placeholderText) {
236 placeholderChild.textContent = this.opts.placeholderText;
237 }
238 }
239 return this._placeholder;
240 }
241 /** @internal */
242 protected _placeholder: GridItemHTMLElement;
243 /** @internal prevent cached layouts from being updated when loading into small column layouts */

Callers

nothing calls this directly

Calls 1

createDivMethod · 0.80

Tested by

no test coverage detected