@cc-component/cc-ex-component 2.1.2 → 2.1.4
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.
|
@@ -109,8 +109,10 @@ export class BaseWindow extends BaseReference {
|
|
|
109
109
|
resetMaskSize() {
|
|
110
110
|
if (!this.maskOpacity) return
|
|
111
111
|
const widget = this.maskOpacity.node.getComponent(Widget);
|
|
112
|
-
|
|
113
|
-
|
|
112
|
+
if (widget) {
|
|
113
|
+
widget.left = -view.getVisibleSize().width
|
|
114
|
+
widget.right = -view.getVisibleSize().width
|
|
115
|
+
}
|
|
114
116
|
}
|
|
115
117
|
}
|
|
116
118
|
|
package/assets/core/ViewModel.ts
CHANGED
|
@@ -21,6 +21,7 @@ import { SpriteFrame } from 'cc';
|
|
|
21
21
|
import { tween } from 'cc';
|
|
22
22
|
import { v3 } from 'cc';
|
|
23
23
|
import { BaseReference } from '../core/BaseReference';
|
|
24
|
+
import { Tween } from 'cc';
|
|
24
25
|
|
|
25
26
|
|
|
26
27
|
interface IBindingData extends ITableViewEvents, IBindingDataEvents {
|
|
@@ -491,7 +492,11 @@ export function ViewModel<T extends new (...args: any[]) => Component>(Base: T)
|
|
|
491
492
|
tween(btn.node).to(btn.duration, { scale: v3(scale, scale, scale) }).start()
|
|
492
493
|
}
|
|
493
494
|
btn[this.touch_end_scale] = () => {
|
|
494
|
-
|
|
495
|
+
const obj = { time: scale }
|
|
496
|
+
Tween.stopAllByTarget(btn.node)
|
|
497
|
+
tween(obj).to(btn.duration, { time: 1 }, {
|
|
498
|
+
onUpdate: (obj) => { if (btn.node?.isValid) { btn.node.scale = v3(obj.time, obj.time, obj.time) } }
|
|
499
|
+
}).start()
|
|
495
500
|
}
|
|
496
501
|
btn.node.on(Node.EventType.TOUCH_START, btn[this.touch_start_scale])
|
|
497
502
|
btn.node.on(Node.EventType.TOUCH_END, btn[this.touch_end_scale])
|