ember-nav-stack 6.0.0 → 6.0.2
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/.vscode/settings.json +6 -0
- package/CHANGELOG.md +11 -0
- package/addon/components/nav-stack/component.js +27 -4
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
## v6.0.2 (2023-12-15)
|
|
2
|
+
|
|
3
|
+
## v6.0.1 (2023-12-15)
|
|
4
|
+
|
|
5
|
+
#### :bug: Bug Fix
|
|
6
|
+
* [#74](https://github.com/yapplabs/ember-nav-stack/pull/74) Add some more checks to make sure element is not destroyed before accessing it ([@lukemelia](https://github.com/lukemelia))
|
|
7
|
+
* [#73](https://github.com/yapplabs/ember-nav-stack/pull/73) Avoid trying to access this.element when component has been torn down ([@lukemelia](https://github.com/lukemelia))
|
|
8
|
+
|
|
9
|
+
#### Committers: 1
|
|
10
|
+
- Luke Melia ([@lukemelia](https://github.com/lukemelia))
|
|
11
|
+
|
|
1
12
|
## v6.0.0 (2023-12-03)
|
|
2
13
|
|
|
3
14
|
#### :boom: Breaking Change
|
|
@@ -157,10 +157,12 @@ export default class NavStack extends Component {
|
|
|
157
157
|
@action
|
|
158
158
|
tearDownHammer() {
|
|
159
159
|
let { hammer, gesture } = this;
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
160
|
+
if (hammer) {
|
|
161
|
+
gesture.unregister(this, hammer.get('pan'));
|
|
162
|
+
hammer.off('pan');
|
|
163
|
+
hammer.destroy();
|
|
164
|
+
this.hammer = null;
|
|
165
|
+
}
|
|
164
166
|
}
|
|
165
167
|
|
|
166
168
|
@action
|
|
@@ -169,6 +171,10 @@ export default class NavStack extends Component {
|
|
|
169
171
|
}
|
|
170
172
|
|
|
171
173
|
handleStackDepthChange(isInitialRender) {
|
|
174
|
+
if (this.isDestroying || this.isDestroyed) {
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
177
|
+
|
|
172
178
|
let stackItems = this.stackItems || [];
|
|
173
179
|
let stackDepth = stackItems.length;
|
|
174
180
|
let rootComponentRef = stackItems[0] && stackItems[0].component;
|
|
@@ -234,6 +240,10 @@ export default class NavStack extends Component {
|
|
|
234
240
|
}
|
|
235
241
|
|
|
236
242
|
cut() {
|
|
243
|
+
if (this.isDestroying || this.isDestroyed) {
|
|
244
|
+
return;
|
|
245
|
+
}
|
|
246
|
+
|
|
237
247
|
this.horizontalTransition({
|
|
238
248
|
toValue: this.computeXPosition(),
|
|
239
249
|
animate: false,
|
|
@@ -249,6 +259,9 @@ export default class NavStack extends Component {
|
|
|
249
259
|
}
|
|
250
260
|
|
|
251
261
|
slideForward() {
|
|
262
|
+
if (this.isDestroying || this.isDestroyed) {
|
|
263
|
+
return;
|
|
264
|
+
}
|
|
252
265
|
this.horizontalTransition({
|
|
253
266
|
toValue: this.computeXPosition(),
|
|
254
267
|
finishCallback: () => {
|
|
@@ -258,6 +271,9 @@ export default class NavStack extends Component {
|
|
|
258
271
|
}
|
|
259
272
|
|
|
260
273
|
slideBack() {
|
|
274
|
+
if (this.isDestroying || this.isDestroyed) {
|
|
275
|
+
return;
|
|
276
|
+
}
|
|
261
277
|
this.horizontalTransition({
|
|
262
278
|
toValue: this.computeXPosition(),
|
|
263
279
|
finishCallback: () => {
|
|
@@ -268,6 +284,10 @@ export default class NavStack extends Component {
|
|
|
268
284
|
}
|
|
269
285
|
|
|
270
286
|
slideUp() {
|
|
287
|
+
if (this.isDestroying || this.isDestroyed) {
|
|
288
|
+
return;
|
|
289
|
+
}
|
|
290
|
+
|
|
271
291
|
let debug = this.birdsEyeDebugging;
|
|
272
292
|
this.verticalTransition({
|
|
273
293
|
element: this.element,
|
|
@@ -277,6 +297,9 @@ export default class NavStack extends Component {
|
|
|
277
297
|
}
|
|
278
298
|
|
|
279
299
|
slideDown() {
|
|
300
|
+
if (this.isDestroying || this.isDestroyed) {
|
|
301
|
+
return;
|
|
302
|
+
}
|
|
280
303
|
let debug = this.birdsEyeDebugging;
|
|
281
304
|
let clonedElement = this.clones.elements[this.clones.elements.length - 1];
|
|
282
305
|
let y = debug ? 480 : clonedElement.getBoundingClientRect().height;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ember-nav-stack",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.2",
|
|
4
4
|
"description": "The default blueprint for ember-cli addons.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-addon"
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"ember-cli-htmlbars": "^6.3.0",
|
|
38
38
|
"ember-decorators": "6.1.1",
|
|
39
39
|
"ember-math-helpers": "^3.0.0",
|
|
40
|
-
"ember-truth-helpers": "^
|
|
40
|
+
"ember-truth-helpers": "^4.0.3",
|
|
41
41
|
"hammerjs": "^2.0.8",
|
|
42
42
|
"macro-decorators": "^0.1.2",
|
|
43
43
|
"webpack": "5",
|