zz-chart
Advanced tools
Comparing version 0.1.0-beta.7 to 0.1.0-beta.8
@@ -9,5 +9,7 @@ /// <reference types="react" resolution-mode="require"/> | ||
container: HTMLElement; | ||
private sizeObserver; | ||
constructor(ctrl: View, position?: 'top' | 'top-left' | 'top-right'); | ||
render(): void; | ||
create(): void; | ||
destroy(): void; | ||
} |
import { StyleSheet, css } from 'aphrodite/no-important.js'; | ||
import { DIRECTION } from '../types/index.js'; | ||
import { generateName } from '../utils/index.js'; | ||
import { generateName, resizeObserver } from '../utils/index.js'; | ||
const styles = StyleSheet.create({ | ||
@@ -22,2 +22,5 @@ top: { | ||
this.render(); | ||
this.sizeObserver = resizeObserver(this.container, () => { | ||
this.ctrl.render(); | ||
}); | ||
} | ||
@@ -43,3 +46,6 @@ get name() { | ||
} | ||
destroy() { | ||
this.sizeObserver.disconnect(); | ||
} | ||
} | ||
//# sourceMappingURL=header.js.map |
{ | ||
"name": "zz-chart", | ||
"version": "0.1.0-beta.7", | ||
"version": "0.1.0-beta.8", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "author": "Alauda", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
432952
11537