Skip to content

Commit

Permalink
Feat: fitHeight property - issue #113
Browse files Browse the repository at this point in the history
  • Loading branch information
roman-rr committed Jan 16, 2021
1 parent 038d900 commit bc2fa1f
Show file tree
Hide file tree
Showing 14 changed files with 548 additions and 345 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file.

## [Unreleased]

### Features
- Added `fitHeight` property for usage pane without breakpoints. On `fitHeight: true`, pane height will automatically calculated before present. Then height will be applied as top breakpoint height, bottom and middle breakpoint will be disabled. See [Bulletin demo](https://output.jsbin.com/maqigod) on example. [#113](https://github.com/roman-rr/cupertino-pane/issues/113)

### Enhancements
- Button close renamed to button destroy to avoid confuses. Option renamed `buttonClose` -> `buttonDestroy` [#116](https://github.com/roman-rr/cupertino-pane/issues/112)

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ new CupertinoPane(element); // HTMLElement
| **inverse** | `boolean` | false | On `true` will change pane direction from `bottom-to-top` to `top-to-bottom` |
| **parentElement** | `string` | Parent element selector | Element selector where pane will rendered |
| **followerElement** | `string` | Follower element selector | Element with selector will following pane transitions |
| **fitHeight** | `boolean` | 'false' | Automatically calc and define content height as top breakpoint. Middle and bottom breakpoint will be disabled |
| **pushElement** | `string` | Push element selector | DOM Element will be pushed and scaled |
| **pushMinHeight** | `number` | Most bottom available point | Height from which 3d push effect will be started |
| **pushYOffset** | `number` | Negative margin value to place pushed element upper |
Expand Down
5 changes: 3 additions & 2 deletions dist/cupertino-pane.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export declare class CupertinoPane {
private drawBaseElements;
present(conf?: {
animate: boolean;
}): void;
}): Promise<void>;
/**
* Private Utils methods
*/
Expand All @@ -46,6 +46,7 @@ export declare class CupertinoPane {
getClosestBreakY(): number;
private scrollElementInit;
setOverflowHeight(offset?: number): void;
private getPaneFitHeight;
private getTimingFunction;
checkOpacityAttr(val: any): void;
checkOverflowAttr(val: any): void;
Expand Down Expand Up @@ -88,7 +89,7 @@ export declare class CupertinoPane {
* Function builder for breakpoints and heights
* @param conf breakpoints
*/
setBreakpoints(conf?: PaneBreaks): void;
setBreakpoints(conf?: PaneBreaks): Promise<void>;
moveToBreak(val: string): any;
moveToHeight(val: number): any;
hide(): any;
Expand Down
397 changes: 233 additions & 164 deletions dist/cupertino-pane.esm.bundle.js

Large diffs are not rendered by default.

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

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

Loading

0 comments on commit bc2fa1f

Please sign in to comment.