@ckeditor/ckeditor5-ui
Advanced tools
Comparing version 0.0.0-nightly-20230714.0 to 0.0.0-nightly-20230715.0
{ | ||
"name": "@ckeditor/ckeditor5-ui", | ||
"version": "0.0.0-nightly-20230714.0", | ||
"version": "0.0.0-nightly-20230715.0", | ||
"description": "The UI framework and standard UI library of CKEditor 5.", | ||
@@ -14,4 +14,4 @@ "keywords": [ | ||
"dependencies": { | ||
"@ckeditor/ckeditor5-core": "0.0.0-nightly-20230714.0", | ||
"@ckeditor/ckeditor5-utils": "0.0.0-nightly-20230714.0", | ||
"@ckeditor/ckeditor5-core": "0.0.0-nightly-20230715.0", | ||
"@ckeditor/ckeditor5-utils": "0.0.0-nightly-20230715.0", | ||
"color-convert": "2.0.1", | ||
@@ -18,0 +18,0 @@ "color-parse": "1.4.2", |
@@ -91,6 +91,2 @@ /** | ||
/** | ||
* The DOM bounding client rect of the {@link module:ui/view~View#element} of the panel. | ||
*/ | ||
private _panelRect?; | ||
/** | ||
* The `top` CSS position of the panel when it is sticky to the top of the viewport or scrollable | ||
@@ -157,2 +153,8 @@ * ancestors of the {@link #limiterElement}. | ||
private _unstick; | ||
/** | ||
* Returns the bounding rect of the {@link #_contentPanel}. | ||
* | ||
* @private | ||
*/ | ||
private get _contentPanelRect(); | ||
} |
@@ -44,3 +44,3 @@ /** | ||
height: bind.to('isSticky', isSticky => { | ||
return isSticky ? toPx(this._panelRect.height) : null; | ||
return isSticky ? toPx(this._contentPanelRect.height) : null; | ||
}) | ||
@@ -109,3 +109,2 @@ } | ||
// @if CK_DEBUG_STICKYPANEL // RectDrawer.clear(); | ||
this._panelRect = new Rect(this._contentPanel); | ||
if (!this.limiterElement || !this.isActive) { | ||
@@ -147,3 +146,3 @@ this._unstick(); | ||
// Check if there's a change the panel can be sticky to the bottom of the limiter. | ||
if (visibleAncestorsTop + this._panelRect.height + this.limiterBottomOffset > visibleLimiterRect.bottom) { | ||
if (visibleAncestorsTop + this._contentPanelRect.height + this.limiterBottomOffset > visibleLimiterRect.bottom) { | ||
const stickyBottomOffset = Math.max(limiterRect.bottom - visibleAncestorsRect.bottom, 0) + this.limiterBottomOffset; | ||
@@ -160,3 +159,3 @@ // @if CK_DEBUG_STICKYPANEL // const stickyBottomOffsetRect = new Rect( { | ||
// move upwards if there's not enough space for it. | ||
if (limiterRect.bottom - stickyBottomOffset > limiterRect.top + this._panelRect.height) { | ||
if (limiterRect.bottom - stickyBottomOffset > limiterRect.top + this._contentPanelRect.height) { | ||
this._stickToBottomOfLimiter(stickyBottomOffset); | ||
@@ -169,3 +168,3 @@ } | ||
else { | ||
if (this._panelRect.height + this.limiterBottomOffset < limiterRect.height) { | ||
if (this._contentPanelRect.height + this.limiterBottomOffset < limiterRect.height) { | ||
this._stickToTopOfAncestors(visibleAncestorsTop); | ||
@@ -229,2 +228,10 @@ } | ||
} | ||
/** | ||
* Returns the bounding rect of the {@link #_contentPanel}. | ||
* | ||
* @private | ||
*/ | ||
get _contentPanelRect() { | ||
return new Rect(this._contentPanel); | ||
} | ||
} | ||
@@ -231,0 +238,0 @@ // Loops over the given element's ancestors to find all the scrollable elements. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1022350
20410
+ Added@ckeditor/ckeditor5-core@0.0.0-nightly-20230715.0(transitive)
+ Added@ckeditor/ckeditor5-engine@0.0.0-nightly-20230715.0(transitive)
+ Added@ckeditor/ckeditor5-utils@0.0.0-nightly-20230715.0(transitive)
- Removed@ckeditor/ckeditor5-core@0.0.0-nightly-20230714.0(transitive)
- Removed@ckeditor/ckeditor5-engine@0.0.0-nightly-20230714.0(transitive)
- Removed@ckeditor/ckeditor5-utils@0.0.0-nightly-20230714.0(transitive)