@quenty/transitionmodel 2.1.1 → 2.2.0
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/CHANGELOG.md +11 -0
- package/package.json +12 -12
- package/src/Shared/TransitionModel.lua +12 -6
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [2.2.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/transitionmodel@2.1.1...@quenty/transitionmodel@2.2.0) (2023-12-14)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* TransitionModel would sometimes stall if no callback was specified ([981cb47](https://github.com/Quenty/NevermoreEngine/commit/981cb4725b4567e3efd6d3ade2566b5a596fea8d))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [2.1.1](https://github.com/Quenty/NevermoreEngine/compare/@quenty/transitionmodel@2.1.0...@quenty/transitionmodel@2.1.1) (2023-10-28)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @quenty/transitionmodel
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/transitionmodel",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "Helps with Gui visiblity showing and hiding",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -25,20 +25,20 @@
|
|
|
25
25
|
"Quenty"
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@quenty/baseobject": "^7.
|
|
29
|
-
"@quenty/basicpane": "^8.
|
|
30
|
-
"@quenty/blend": "^7.
|
|
31
|
-
"@quenty/instanceutils": "^8.
|
|
32
|
-
"@quenty/loader": "^7.
|
|
28
|
+
"@quenty/baseobject": "^7.1.0",
|
|
29
|
+
"@quenty/basicpane": "^8.2.0",
|
|
30
|
+
"@quenty/blend": "^7.2.0",
|
|
31
|
+
"@quenty/instanceutils": "^8.2.0",
|
|
32
|
+
"@quenty/loader": "^7.1.0",
|
|
33
33
|
"@quenty/maid": "^2.6.0",
|
|
34
|
-
"@quenty/promise": "^7.
|
|
35
|
-
"@quenty/rx": "^8.
|
|
36
|
-
"@quenty/signal": "^3.
|
|
37
|
-
"@quenty/timedtween": "^2.
|
|
38
|
-
"@quenty/valueobject": "^8.
|
|
34
|
+
"@quenty/promise": "^7.1.0",
|
|
35
|
+
"@quenty/rx": "^8.2.0",
|
|
36
|
+
"@quenty/signal": "^3.1.0",
|
|
37
|
+
"@quenty/timedtween": "^2.2.0",
|
|
38
|
+
"@quenty/valueobject": "^8.2.0"
|
|
39
39
|
},
|
|
40
40
|
"publishConfig": {
|
|
41
41
|
"access": "public"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "2c2dbbc0cb2fbb46b4f3270c559c63890fe18b26"
|
|
44
44
|
}
|
|
@@ -226,10 +226,10 @@ function TransitionModel:_promiseIsHidden()
|
|
|
226
226
|
end
|
|
227
227
|
|
|
228
228
|
function TransitionModel:_executeShow(doNotAnimate)
|
|
229
|
-
|
|
229
|
+
self._maid._transition = nil
|
|
230
230
|
|
|
231
|
-
local
|
|
232
|
-
maid:
|
|
231
|
+
local maid = Maid.new()
|
|
232
|
+
local promise = maid:Add(Promise.new())
|
|
233
233
|
|
|
234
234
|
self._isHidingComplete.Value = false
|
|
235
235
|
self._isShowingComplete.Value = false
|
|
@@ -242,6 +242,9 @@ function TransitionModel:_executeShow(doNotAnimate)
|
|
|
242
242
|
promise:Reject()
|
|
243
243
|
error(string.format("[TransitionModel] - Expected promise to be returned from showCallback, got %q", tostring(result)))
|
|
244
244
|
end
|
|
245
|
+
else
|
|
246
|
+
-- Immediately resolve
|
|
247
|
+
promise:Resolve()
|
|
245
248
|
end
|
|
246
249
|
|
|
247
250
|
promise:Then(function()
|
|
@@ -252,14 +255,14 @@ function TransitionModel:_executeShow(doNotAnimate)
|
|
|
252
255
|
end
|
|
253
256
|
|
|
254
257
|
function TransitionModel:_executeHide(doNotAnimate)
|
|
258
|
+
self._maid._transition = nil
|
|
259
|
+
|
|
255
260
|
local maid = Maid.new()
|
|
261
|
+
local promise = maid:Add(Promise.new())
|
|
256
262
|
|
|
257
263
|
self._isHidingComplete.Value = false
|
|
258
264
|
self._isShowingComplete.Value = false
|
|
259
265
|
|
|
260
|
-
local promise = Promise.new()
|
|
261
|
-
maid:GiveTask(promise)
|
|
262
|
-
|
|
263
266
|
if self._hideCallback then
|
|
264
267
|
local result = self._hideCallback(maid, doNotAnimate)
|
|
265
268
|
if Promise.isPromise(result) then
|
|
@@ -268,6 +271,9 @@ function TransitionModel:_executeHide(doNotAnimate)
|
|
|
268
271
|
promise:Reject()
|
|
269
272
|
error(string.format("[TransitionModel] - Expected promise to be returned from hideCallback, got %q", tostring(result)))
|
|
270
273
|
end
|
|
274
|
+
else
|
|
275
|
+
-- Immediately resolve
|
|
276
|
+
promise:Resolve()
|
|
271
277
|
end
|
|
272
278
|
|
|
273
279
|
promise:Then(function()
|