veams-plugin-media-query-handler
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -0,1 +1,4 @@ | ||
### v1.0.2 | ||
- Trigger resize event on resize without comparing width | ||
### v1.0.1 | ||
@@ -2,0 +5,0 @@ - Update description |
@@ -112,6 +112,4 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
if (width !== Veams.detections.width) { | ||
Veams.detections.width = width; | ||
Veams.Vent.trigger(Veams.EVENTS.resize, e); | ||
} | ||
Veams.detections.width = width; | ||
Veams.Vent.trigger(Veams.EVENTS.resize, e); | ||
}, this.options.delay); | ||
@@ -118,0 +116,0 @@ } |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("index",[],t):"object"==typeof exports?exports.index=t():(e.index=e.index||{},e.index.index=t())}(this,function(){return function(e){function t(n){if(i[n])return i[n].exports;var r=i[n]={exports:{},id:n,loaded:!1};return e[n].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var i={};return t.m=e,t.c=i,t.p="",t(0)}([function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i={options:{mediaQueryProp:"font-family",delay:300},pluginName:"MediaQueryHandler",initialize:function(e,t){var i=this,n=document.querySelectorAll("head");t&&(this.options=e.helpers.extend(this.options,t||{})),e.currentMedia=window.getComputedStyle(n[0],null).getPropertyValue(this.options.mediaQueryProp),e.Vent||console.info("VeamsMediaQueryHandler :: In order to work properly with the VeamsMediaQueryHandler plugin you should add the VeamsVent plugin!"),window.onresize=e.helpers.throttle(function(t){var r=window.getComputedStyle(n[0],null).getPropertyValue(i.options.mediaQueryProp),o=window.innerWidth;if(r!==e.currentMedia){var d=e.currentMedia;e.currentMedia=r,console.info("VeamsMediaQueryHandler :: Current media is "+e.currentMedia),e.Vent&&e.Vent.trigger(e.EVENTS.mediachange,{type:e.EVENTS.mediachange,currentMedia:r,oldMedia:d})}o!==e.detections.width&&(e.detections.width=o,e.Vent.trigger(e.EVENTS.resize,t))},this.options.delay)}};t["default"]=i,e.exports=t["default"]}])}); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("index",[],t):"object"==typeof exports?exports.index=t():(e.index=e.index||{},e.index.index=t())}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={options:{mediaQueryProp:"font-family",delay:300},pluginName:"MediaQueryHandler",initialize:function(e,t){var n=this,r=document.querySelectorAll("head");t&&(this.options=e.helpers.extend(this.options,t||{})),e.currentMedia=window.getComputedStyle(r[0],null).getPropertyValue(this.options.mediaQueryProp),e.Vent||console.info("VeamsMediaQueryHandler :: In order to work properly with the VeamsMediaQueryHandler plugin you should add the VeamsVent plugin!"),window.onresize=e.helpers.throttle(function(t){var i=window.getComputedStyle(r[0],null).getPropertyValue(n.options.mediaQueryProp),o=window.innerWidth;if(i!==e.currentMedia){var d=e.currentMedia;e.currentMedia=i,console.info("VeamsMediaQueryHandler :: Current media is "+e.currentMedia),e.Vent&&e.Vent.trigger(e.EVENTS.mediachange,{type:e.EVENTS.mediachange,currentMedia:i,oldMedia:d})}e.detections.width=o,e.Vent.trigger(e.EVENTS.resize,t)},this.options.delay)}};t["default"]=n,e.exports=t["default"]}])}); | ||
//# sourceMappingURL=index.min.js.map |
{ | ||
"name": "veams-plugin-media-query-handler", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "The VeamsMediaQueryHandler plugin provides to you a possibility to get the current media query name from your css.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -50,6 +50,4 @@ 'use strict'; | ||
if (width !== Veams.detections.width) { | ||
Veams.detections.width = width; | ||
Veams.Vent.trigger(Veams.EVENTS.resize, e); | ||
} | ||
Veams.detections.width = width; | ||
Veams.Vent.trigger(Veams.EVENTS.resize, e); | ||
}, this.options.delay); | ||
@@ -56,0 +54,0 @@ } |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
133067
204
1