Просмотр исходного кода

fixed missing container resize on handleWidth and labelWidth programmatic call

Emanuele Marchi 10 лет назад
Родитель
Сommit
01ba92b351

+ 2 - 0
dist/js/bootstrap-switch.js

@@ -342,6 +342,7 @@
         }
         this.options.handleWidth = value;
         this._width();
+        this._containerPosition();
         return this.$element;
       };
 
@@ -351,6 +352,7 @@
         }
         this.options.labelWidth = value;
         this._width();
+        this._containerPosition();
         return this.$element;
       };
 

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
dist/js/bootstrap-switch.min.js


+ 2 - 0
src/coffee/bootstrap-switch.coffee

@@ -259,6 +259,7 @@ do ($ = window.jQuery, window) ->
 
       @options.handleWidth = value
       @_width()
+      @_containerPosition()
       @$element
 
     labelWidth: (value) ->
@@ -266,6 +267,7 @@ do ($ = window.jQuery, window) ->
 
       @options.labelWidth = value
       @_width()
+      @_containerPosition()
       @$element
 
     baseClass: (value) ->

+ 2 - 0
test/bootstrap-switch.js

@@ -342,6 +342,7 @@
         }
         this.options.handleWidth = value;
         this._width();
+        this._containerPosition();
         return this.$element;
       };
 
@@ -351,6 +352,7 @@
         }
         this.options.labelWidth = value;
         this._width();
+        this._containerPosition();
         return this.$element;
       };
 

Некоторые файлы не были показаны из-за большого количества измененных файлов