Skip to content

Commit

Permalink
chore(release): Release react-flicking 0.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
daybrush committed Nov 15, 2018
1 parent c9ba354 commit cb3c833
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
14 changes: 13 additions & 1 deletion packages/react-flicking/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@egjs/react-flicking",
"version": "0.0.1",
"version": "0.0.2",
"main": "dist/flicking.cjs.js",
"module": "dist/flicking.esm.js",
"types": "declaration/index.d.ts",
Expand All @@ -16,6 +16,18 @@
"react"
],
"description": "A react component that can easily use @egjs/flicking",
"homepage": "https://github.com/naver/egjs-flicking/tree/master/packages/react-flicking",
"repository": {
"type": "git",
"url": "https://github.com/naver/egjs-flicking/tree/master/packages/react-flicking"
},
"author": {
"name": "NAVER Corp."
},
"namespace": {
"eg": "eg"
},
"license": "MIT",
"dependencies": {
"@egjs/flicking": "^2.4.2"
},
Expand Down
2 changes: 0 additions & 2 deletions packages/react-flicking/src/infiniteflicking.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ export default class App extends React.Component {
count: 3,
}
public onFlickEnd = (e: any) => {
console.log(e.direction,DIRECTION_LEFT, e.no);
if (e.direction === DIRECTION_LEFT && e.no + 1 === this.state.count) {
console.log("?");
this.setState({ count: this.state.count + 1 });
}
}
Expand Down
8 changes: 7 additions & 1 deletion packages/react-flicking/src/react-flicking/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,9 @@ export default class Flicking extends React.Component<IFlickingProps> {
addClass(el, className);
el.style.cssText += `position:absolute;box-sizing:border-box;${horizontal ? "height" : "size"}: 100%;top:0;left:0;`;
});
panel.count = panel.$list.children;
panel.count = panel.$list.length;
panel.origCount = panel.count;

flicking._applyPanelsPos();
this.resize();
}
Expand Down Expand Up @@ -162,6 +163,11 @@ export default class Flicking extends React.Component<IFlickingProps> {
}
public resize = () => {
this.flicking.resize();
(this.flicking as any).plugins.forEach((plugin: any) => {
if (plugin.resize) {
plugin.resize();
}
});
return this;
}
public componentWillUnmount() {
Expand Down

0 comments on commit cb3c833

Please sign in to comment.