소스 검색

fixed typo

Muzaffer Dede 5 년 전
부모
커밋
f948f9f4f3
5개의 변경된 파일25개의 추가작업 그리고 25개의 파일을 삭제
  1. 8 8
      dist/alpine-ie11.js
  2. 8 8
      dist/alpine.js
  3. 3 3
      src/directives/show.js
  4. 5 5
      src/utils.js
  5. 1 1
      test/transition.spec.js

+ 8 - 8
dist/alpine-ie11.js

@@ -5923,7 +5923,7 @@
 
         stages.end(); // Asign current transition to el in case we need to force it
 
-        el.__x_remaning_transitions = function () {
+        el.__x_remaining_transitions = function () {
           _newArrowCheck(this, _this15);
 
           stages.hide(); // Adding an "isConnected" check, in case the callback
@@ -5934,15 +5934,15 @@
           } // Safe to remove transition from el since it is completed
 
 
-          delete el.__x_remaning_transitions;
+          delete el.__x_remaining_transitions;
         }.bind(this);
 
         setTimeout(function () {
           _newArrowCheck(this, _this15);
 
-          // We only want to run remaning transitions in the end if they exists
-          if (el.__x_remaning_transitions) {
-            el.__x_remaning_transitions();
+          // We only want to run remaining transitions in the end if they exists
+          if (el.__x_remaining_transitions) {
+            el.__x_remaining_transitions();
           }
         }.bind(this), duration);
       }.bind(this));
@@ -6250,8 +6250,8 @@
     var initialUpdate = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
 
     // Resolve any previous pending transitions before starting a new one
-    if (el.__x_remaning_transitions) {
-      el.__x_remaning_transitions();
+    if (el.__x_remaining_transitions) {
+      el.__x_remaining_transitions();
     }
 
     var hide = function hide() {
@@ -6293,7 +6293,7 @@
             _newArrowCheck(this, _this2);
 
             // If previous transitions still there, don't use resolve
-            if (el.__x_remaning_transitions) {
+            if (el.__x_remaining_transitions) {
               hide();
             } else {
               resolve(function () {

+ 8 - 8
dist/alpine.js

@@ -406,7 +406,7 @@
       requestAnimationFrame(() => {
         stages.end(); // Asign current transition to el in case we need to force it
 
-        el.__x_remaning_transitions = () => {
+        el.__x_remaining_transitions = () => {
           stages.hide(); // Adding an "isConnected" check, in case the callback
           // removed the element from the DOM.
 
@@ -415,13 +415,13 @@
           } // Safe to remove transition from el since it is completed
 
 
-          delete el.__x_remaning_transitions;
+          delete el.__x_remaining_transitions;
         };
 
         setTimeout(() => {
-          // We only want to run remaning transitions in the end if they exists
-          if (el.__x_remaning_transitions) {
-            el.__x_remaning_transitions();
+          // We only want to run remaining transitions in the end if they exists
+          if (el.__x_remaining_transitions) {
+            el.__x_remaining_transitions();
           }
         }, duration);
       });
@@ -647,8 +647,8 @@
 
   function handleShowDirective(component, el, value, modifiers, initialUpdate = false) {
     // Resolve any previous pending transitions before starting a new one
-    if (el.__x_remaning_transitions) {
-      el.__x_remaning_transitions();
+    if (el.__x_remaining_transitions) {
+      el.__x_remaining_transitions();
     }
 
     const hide = () => {
@@ -678,7 +678,7 @@
         if (el.style.display !== 'none') {
           transitionOut(el, () => {
             // If previous transitions still there, don't use resolve
-            if (el.__x_remaning_transitions) {
+            if (el.__x_remaining_transitions) {
               hide();
             } else {
               resolve(() => {

+ 3 - 3
src/directives/show.js

@@ -2,8 +2,8 @@ import { transitionIn, transitionOut } from '../utils'
 
 export function handleShowDirective(component, el, value, modifiers, initialUpdate = false) {
     // Resolve any previous pending transitions before starting a new one
-    if (el.__x_remaning_transitions) {
-        el.__x_remaning_transitions()
+    if (el.__x_remaining_transitions) {
+        el.__x_remaining_transitions()
     }
 
     const hide = () => {
@@ -32,7 +32,7 @@ export function handleShowDirective(component, el, value, modifiers, initialUpda
             if ( el.style.display !== 'none' ) {
                 transitionOut(el, () => {
                     // If previous transitions still there, don't use resolve
-                    if (el.__x_remaning_transitions) {
+                    if (el.__x_remaining_transitions) {
                         hide()
                     } else {
                         resolve(() => {

+ 5 - 5
src/utils.js

@@ -398,7 +398,7 @@ export function transition(el, stages) {
             stages.end()
 
             // Asign current transition to el in case we need to force it
-            el.__x_remaning_transitions = () => {
+            el.__x_remaining_transitions = () => {
 
                 stages.hide()
 
@@ -409,13 +409,13 @@ export function transition(el, stages) {
                 }
 
                 // Safe to remove transition from el since it is completed
-                delete el.__x_remaning_transitions
+                delete el.__x_remaining_transitions
             }
 
             setTimeout(() => {
-                // We only want to run remaning transitions in the end if they exists
-                if (el.__x_remaning_transitions) {
-                    el.__x_remaning_transitions()
+                // We only want to run remaining transitions in the end if they exists
+                if (el.__x_remaining_transitions) {
+                    el.__x_remaining_transitions()
                 }
             }, duration);
         })

+ 1 - 1
test/transition.spec.js

@@ -621,7 +621,7 @@ test('x-transition supports css animation', async () => {
     expect(document.querySelector('span').classList.contains('animation-leave')).toEqual(false)
 })
 
-test('remaning transitions forced to complete if they exists', async () => {
+test('remaining transitions forced to complete if they exists', async () => {
     jest.spyOn(window, 'requestAnimationFrame').mockImplementation((callback) => {
         setTimeout(callback, 0)
     });