Skip to content

Commit

Permalink
Backbone div switching to relative position and no zero-width-height,…
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanolson committed Feb 15, 2025
1 parent 5548b9f commit 0a33e3c
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 10 deletions.
17 changes: 15 additions & 2 deletions docs/lib/scenerystack.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -243874,7 +243874,7 @@ class BackboneDrawable extends Drawable {
*
* @returns {HTMLDivElement}
*/
static createDivBackbone() {
static createRootDivBackbone() {
const div = document.createElement('div');
div.style.position = 'absolute';
div.style.left = '0';
Expand All @@ -243883,6 +243883,19 @@ class BackboneDrawable extends Drawable {
div.style.height = '0';
return div;
}
/**
* Creates a DOM element for a backbone.
* @public
*
* @returns {HTMLDivElement}
*/
static createDivBackbone() {
const div = document.createElement('div');
div.style.position = 'relative';
div.style.left = '0';
div.style.top = '0';
return div;
}
/**
* Given an external element, we apply the necessary style to make it compatible as a backbone DOM element.
* @public
Expand Down Expand Up @@ -249986,7 +249999,7 @@ class Display {
this._rootBackbone = null; // to be filled in later
this._domElement = options.container ?
BackboneDrawable.repurposeBackboneContainer(options.container) :
BackboneDrawable.createDivBackbone();
BackboneDrawable.createRootDivBackbone();
this._sharedCanvasInstances = {};
this._baseInstance = null; // will be filled with the root Instance
this._frameId = 0;
Expand Down
2 changes: 1 addition & 1 deletion docs/lib/scenerystack.esm.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/lib/scenerystack.esm.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/lib/scenerystack.esm.min.js.map

Large diffs are not rendered by default.

Loading

0 comments on commit 0a33e3c

Please sign in to comment.