File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
resources/views/components Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change 77 ' pt-20 sm:p-5' => ! $fullscreen ,
88 ' size-full min-w-0 flex pointer-events-none [&>*]:pointer-events-auto' ,
99]) ! !} x-data =" {
10- modalDirection: {{ $direction ? Js:: from ($direction ) : ' [0, 0] ' } } ,
10+ modalDirection: {{ Js:: from ($direction ) } } ,
1111 modalPosition: [null, null],
1212 computeModalDirection() {
1313 const [px, py] = this.modalPosition;
3434 return [px, py];
3535 },
3636 init() {
37- @if (! $direction ) this.$nextTick(() => {
38- this.modalPosition = this.computeModalPosition();
39- this.modalDirection = this.computeModalDirection();
40- }); @endif
37+ if (!this.modalDirection) {
38+ this.$nextTick(() => {
39+ this.modalPosition = this.computeModalPosition();
40+ this.modalDirection = this.computeModalDirection();
41+ });
42+ }
4143
4244 },
4345 modalAttributes: {
4446 ['x-show']() { return isModalStacked ? modalHistory.includes(modalId) : isModalActive; },
4547 ['x-bind:inert']() { return !isModalActive },
4648 ['x-bind:style']() {
4749 if (isModalStacked) {
48- const [dx, dy] = this.modalDirection;
50+ const [dx, dy] = ( this.modalDirection ?? [0, 0]) ;
4951
5052 return {
5153 '--dx': dx,
You can’t perform that action at this time.
0 commit comments