@egjs/flicking 4.5.0 → 4.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@egjs/flicking",
3
- "version": "4.5.0",
3
+ "version": "4.5.1",
4
4
  "description": "Everyday 30 million people experience. It's reliable, flexible and extendable carousel.",
5
5
  "main": "dist/flicking.js",
6
6
  "module": "dist/flicking.esm.js",
@@ -107,7 +107,7 @@
107
107
  "postcss-cli": "^7.1.1",
108
108
  "print-coveralls": "^1.2.2",
109
109
  "print-sizes": "0.0.3",
110
- "pvu": "^0.4.1",
110
+ "pvu": "^0.6.1",
111
111
  "rollup": "^2.41.5",
112
112
  "rollup-plugin-livereload": "^1.3.0",
113
113
  "rollup-plugin-postcss": "^3.1.3",
@@ -34,7 +34,8 @@ const withFlickingMethods = (prototype: any, flickingName: string) => {
34
34
  const getterDescriptor: { get?: () => any; set?: (val: any) => void } = {};
35
35
  if (descriptor.get) {
36
36
  getterDescriptor.get = function() {
37
- return descriptor.get?.call(this[flickingName]);
37
+ const flicking = this[flickingName];
38
+ return flicking && descriptor.get?.call(flicking);
38
39
  };
39
40
  }
40
41
  if (descriptor.set) {
@@ -141,6 +141,16 @@ class StrictControl extends Control {
141
141
  return this;
142
142
  }
143
143
 
144
+ public async moveToPanel(panel: Panel, options: Parameters<Control["moveToPanel"]>[1]): Promise<void> {
145
+ const flicking = getFlickingAttached(this._flicking);
146
+ const camera = flicking.camera;
147
+ const controller = this._controller;
148
+
149
+ controller.update(camera.controlParams);
150
+
151
+ return super.moveToPanel(panel, options);
152
+ }
153
+
144
154
  /**
145
155
  * Move {@link Camera} to the given position
146
156
  * @ko {@link Camera}를 주어진 좌표로 이동합니다