瀏覽代碼

removed label drag listener when mouse leave is fired

Emanuele Marchi 11 年之前
父節點
當前提交
6827b0e27d
共有 3 個文件被更改,包括 8 次插入0 次删除
  1. 5 0
      build/js/bootstrap-switch.js
  2. 0 0
      build/js/bootstrap-switch.min.js
  3. 3 0
      src/coffee/bootstrap-switch.coffee

+ 5 - 0
build/js/bootstrap-switch.js

@@ -377,6 +377,11 @@
               }
             };
           })(this),
+          "mouseleave.bootstrapSwitch": (function(_this) {
+            return function(e) {
+              return _this.$label.trigger("mouseup.bootstrapSwitch");
+            };
+          })(this),
           "click.bootstrapSwitch": (function(_this) {
             return function(e) {
               e.preventDefault();

文件差異過大導致無法顯示
+ 0 - 0
build/js/bootstrap-switch.min.js


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

@@ -275,6 +275,9 @@
           @$div.css "margin-left", ""
           @$wrapper.addClass "#{@name}-animate" if @options.animate
 
+        "mouseleave.bootstrapSwitch": (e) =>
+          @$label.trigger "mouseup.bootstrapSwitch"
+
         "click.bootstrapSwitch": (e) =>
           e.preventDefault()
           e.stopImmediatePropagation()

部分文件因文件數量過多而無法顯示