]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
refactor: remove some unused code
authorDaniel Ruf <mac1@daniel-ruf.de>
Sat, 5 Oct 2019 15:45:37 +0000 (17:45 +0200)
committerDaniel Ruf <mac1@daniel-ruf.de>
Sat, 5 Oct 2019 15:54:37 +0000 (17:54 +0200)
js/foundation.accordionMenu.js
js/foundation.core.utils.js
js/foundation.magellan.js
js/foundation.slider.js
js/foundation.sticky.js
js/foundation.util.box.js

index 9169af8c253f0940f0895b9e8740783ec9a549f1..dbd3a1fc7f87af4fc70e3cdb092ac3cbe345d00f 100644 (file)
@@ -93,7 +93,6 @@ class AccordionMenu extends Plugin {
     });
     var initPanes = this.$element.find('.is-active');
     if(initPanes.length){
-      var _this = this;
       initPanes.each(function(){
         _this.down($(this));
       });
index b6778b72b3c4123e479e610f925a1d9692dd5f0b..bce3f8ed1eb81deddc3bc43f22c7df60408a05d9 100644 (file)
@@ -53,8 +53,8 @@ function transitionend($elem){
   }
   if(end){
     return end;
-  }else{
-    end = setTimeout(function(){
+  } else {
+    setTimeout(function(){
       $elem.triggerHandler('transitionend', [$elem]);
     }, 1);
     return 'transitionend';
index d2e6696f737f187f8854f05c8789b5c715528a00..441efd40fa0826b40d52d533236123c43c8842fa 100644 (file)
@@ -83,12 +83,7 @@ class Magellan extends Plugin {
    * @private
    */
   _events() {
-    var _this = this,
-        $body = $('html, body'),
-        opts = {
-          duration: _this.options.animationDuration,
-          easing:   _this.options.animationEasing
-        };
+    var _this = this;
 
     $(window).one('load', function(){
       if(_this.options.deepLinking){
index bc340fbbaeadf507aec2bfc93380454842640c2a..cd1f9e992003d2306eec80e3f6fb9ffab2cd23ea 100644 (file)
@@ -73,8 +73,7 @@ class Slider extends Plugin {
     this.$input = this.inputs.length ? this.inputs.eq(0) : $(`#${this.$handle.attr('aria-controls')}`);
     this.$fill = this.$element.find('[data-slider-fill]').css(this.options.vertical ? 'height' : 'width', 0);
 
-    var isDbl = false,
-        _this = this;
+    var _this = this;
     if (this.options.disabled || this.$element.hasClass(this.options.disabledClass)) {
       this.options.disabled = true;
       this.$element.addClass(this.options.disabledClass);
@@ -94,7 +93,6 @@ class Slider extends Plugin {
       if (!this.inputs[1]) {
         this.inputs = this.inputs.add(this.$input2);
       }
-      isDbl = true;
 
       // this.$handle.triggerHandler('click.zf.slider');
       this._setInitAttr(1);
@@ -366,11 +364,9 @@ class Slider extends Plugin {
           param = vertical ? 'height' : 'width',
           direction = vertical ? 'top' : 'left',
           eventOffset = vertical ? e.pageY : e.pageX,
-          halfOfHandle = this.$handle[0].getBoundingClientRect()[param] / 2,
           barDim = this.$element[0].getBoundingClientRect()[param],
           windowScroll = vertical ? $(window).scrollTop() : $(window).scrollLeft();
 
-
       var elemOffset = this.$element.offset()[direction];
 
       // touch events emulated by the touch util give position relative to screen, add window.scroll to event coordinates...
@@ -463,8 +459,7 @@ class Slider extends Plugin {
    */
   _eventsForHandle($handle) {
     var _this = this,
-        curHandle,
-        timer;
+        curHandle;
 
       const handleChangeEvent = function(e) {
         const idx = _this.inputs.index($(this));
index 3ae09866ba2d2bb6c4568c6dd7b1dc79d492bb20..029bf8f112bf08f48432699a40fa6d2d1c857b5f 100644 (file)
@@ -274,7 +274,6 @@ class Sticky extends Plugin {
         css = {},
         anchorPt = (this.points ? this.points[1] - this.points[0] : this.anchorHeight) - this.elemHeight,
         mrgn = stickToTop ? 'marginTop' : 'marginBottom',
-        notStuckTo = stickToTop ? 'bottom' : 'top',
         topOrBottom = isTop ? 'top' : 'bottom';
 
     css[mrgn] = 0;
index 11688c35861b4c22203a1c7d7c6ae419e7b30dc0..f48c5ed06d48888fb499710c426aa5d946221c7c 100644 (file)
@@ -1,8 +1,5 @@
 'use strict';
 
-
-import { rtl as Rtl } from "./foundation.core.utils";
-
 var Box = {
   ImNotTouchingYou: ImNotTouchingYou,
   OverlapArea: OverlapArea,