Skip to content

Commit

Permalink
Release - 1.2.7
Browse files Browse the repository at this point in the history
  • Loading branch information
roman-rr committed May 8, 2021
1 parent bbe3d95 commit 6f65ab8
Show file tree
Hide file tree
Showing 16 changed files with 677 additions and 537 deletions.
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,21 @@
# Change Log
All notable changes to this project will be documented in this file.

## [1.2.7] - 2021-05-08

### Extra
- [Rich notifications live](https://jsbin.com/neqoxef)

### Features
- Functions `.present()` and `.destroy()` enhanced to using Promise like functins. [#144](https://github.com/roman-rr/cupertino-pane/issues/144)
```js
await myPane.present({animate: true});
myPane.destroy({animate: true}).then(...);
```

### Bug Fixes
- Fixed slow drag gesture with velocity when first `touchmove` not firing

## [1.2.6] - 2021-03-18

### BREAKING CHANGES
Expand Down
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ Support this project with your organization. Your logo will show up here with a
<a href="https://opencollective.com/cupertino-pane"><img src="https://opencollective.com/cupertino-pane/organizations.svg?width=890"></a>

## Demonstration
- [Rich notifications live](https://jsbin.com/neqoxef)
- [Base live](https://output.jsbin.com/fuhisey)
- [Overflow top live](https://output.jsbin.com/baguroy)
- [Z-stack full live](https://output.jsbin.com/benidub)
Expand Down Expand Up @@ -142,7 +143,7 @@ If you don't want to include Cupertino Pane files in your project, you may use i
onDrag: () => console.log('Drag event')
}
);
myPane.present({animate: true});
myPane.present({animate: true}).then(res => {...});
};
</script>
</body>
Expand All @@ -152,7 +153,7 @@ If you don't want to include Cupertino Pane files in your project, you may use i
$(document).ready(function () {
//initialize pane when document ready
var myPane = new CupertinoPane('.cupertino-pane', { /* ... */ });
myPane.present({animate: true});
myPane.present({animate: true}).then(...);
});
```
### As an ES module
Expand All @@ -162,7 +163,7 @@ import { CupertinoPane, CupertinoSettings } from 'cupertino-pane';

let settings: CupertinoSettings = { /* ... */ };
let myPane = new CupertinoPane('.cupertino-pane', settings);
myPane.present({animate: true});
await myPane.present({animate: true});
```

### Class creation
Expand Down Expand Up @@ -270,8 +271,8 @@ The function that executes when the event fires.
| **onTransitionEnd** | `void: () => {}` | Executes when transition and animation complete |

## Public Methods
### present({animate: **boolean = false**})
Will render pane DOM and show pane with setted params.
### present({animate: **boolean = false**}): Promise<CupertinoPane>
Will render pane DOM and show pane with setted params.
```javascript
myPane.present();
```
Expand All @@ -290,7 +291,7 @@ Dissappear pane from screen, still keep pane in DOM.
```javascript
myPane.hide();
```
### destroy({animate: **boolean = false**})
### destroy({animate: **boolean = false**}): Promise<CupertinoPane>
Remove pane from DOM and clear styles
```javascript
myPane.destroy();
Expand Down
2 changes: 1 addition & 1 deletion dist/breakpoints.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export declare class Breakpoints {
* Function builder for breakpoints and heights
* @param conf breakpoints
*/
buildBreakpoints(conf?: PaneBreaks, lock?: boolean): Promise<void>;
buildBreakpoints(conf?: PaneBreaks, bottomOffset?: number): Promise<void>;
getCurrentBreakName(): (string | null);
/**
* Private class methods
Expand Down
8 changes: 4 additions & 4 deletions dist/cupertino-pane.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export declare class CupertinoPane {
private drawBaseElements;
present(conf?: {
animate: boolean;
}): Promise<void>;
}): Promise<CupertinoPane>;
getPaneHeight(): number;
updateScreenHeights(): void;
scrollElementInit(): void;
Expand Down Expand Up @@ -78,7 +78,7 @@ export declare class CupertinoPane {
* Public user method to reset breakpoints
* @param conf
*/
setBreakpoints(conf?: PaneBreaks): Promise<void>;
setBreakpoints(conf?: PaneBreaks, bottomOffset?: number): Promise<void>;
calcFitHeight(): Promise<any>;
moveToBreak(val: string): any;
moveToHeight(val: number): any;
Expand All @@ -89,10 +89,10 @@ export declare class CupertinoPane {
destroy(conf?: {
animate: boolean;
destroyButton?: boolean;
}): any;
}): Promise<true>;
private pushTransition;
/***********************************
* Transitions handler
*/
doTransition(params?: any): void;
doTransition(params?: any): Promise<true>;
}
Loading

0 comments on commit 6f65ab8

Please sign in to comment.