Skip to content

Commit

Permalink
fix(fitHeight): deal with Ionic framework
Browse files Browse the repository at this point in the history
  • Loading branch information
roman-rr committed Aug 23, 2023
1 parent 846145d commit 029d625
Show file tree
Hide file tree
Showing 17 changed files with 66 additions and 75 deletions.
4 changes: 2 additions & 2 deletions dist/core/index.js

Large diffs are not rendered by default.

26 changes: 14 additions & 12 deletions dist/cupertino-pane.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*
* Released under the MIT License
*
* Released on: August 22, 2023
* Released on: August 23, 2023
*/

/******************************************************************************
Expand Down Expand Up @@ -1580,6 +1580,7 @@ class FitHeightModule {
if (this.settings.breaks['top'].height > this.instance.screen_height) {
this.settings.breaks['top'].height = this.instance.screen_height - (this.settings.bottomOffset * 2);
this.settings.topperOverflow = true;
this.settings.upperThanTop = false;
}
else {
if (this.instance.overflowEl && !this.settings.maxFitHeight) {
Expand Down Expand Up @@ -2154,6 +2155,18 @@ class CupertinoPane {
console.warn('Cupertino Pane: specified selector or DOM element already in use', this.selector);
return;
}
/**
* Deal with Ionic Framework
* Ionic cancel transition if the app is not ready
* https://github.com/tech-systems/panes/issues/216
* Good to get rid of that, but Ionic team seems not
* have a solution for this
* https://github.com/ionic-team/ionic-framework/issues/27984
*/
if (conf.animate && this.device.ionic) {
yield this.ionApp['componentOnReady']();
yield new Promise(resolve => requestAnimationFrame(resolve));
}
// Emit event
this.emit('onWillPresent');
this.updateScreenHeights();
Expand Down Expand Up @@ -2201,17 +2214,6 @@ class CupertinoPane {
// One frame before transition
yield new Promise(resolve => requestAnimationFrame(resolve));
if (conf.animate) {
if (this.device.ionic) {
/**
* Ionic cancel transition if the app is not ready
* https://github.com/tech-systems/panes/issues/216
* Good to get rid of that, but Ionic team seems not
* have a solution for this
* https://github.com/ionic-team/ionic-framework/issues/27984
*/
yield this.ionApp['componentOnReady']();
yield new Promise(resolve => requestAnimationFrame(resolve));
}
yield this.transitions.doTransition({
type: 'present', conf,
translateY: this.breakpoints.breaks[this.settings.initialBreak]
Expand Down
4 changes: 2 additions & 2 deletions dist/cupertino-pane.esm.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/cupertino-pane.esm.min.js.map

Large diffs are not rendered by default.

26 changes: 14 additions & 12 deletions dist/cupertino-pane.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/cupertino-pane.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dist/cupertino-pane.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/modules/backdrop.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 029d625

Please sign in to comment.