@nrk/core-scroll
Advanced tools
Comparing version 1.2.1 to 1.2.2
'use strict'; | ||
var name = "@nrk/core-scroll"; | ||
var version = "1.2.0"; | ||
var version = "1.2.1"; | ||
@@ -116,2 +116,3 @@ var IS_BROWSER = typeof window !== 'undefined'; | ||
var SIGNIFICANT_DRAG_THRESHOLD = 10; | ||
var FALLBACK_SCROLLBAR_SIZE = 18; | ||
var FRICTION = 0.8; | ||
@@ -136,5 +137,8 @@ var VELOCITY = 20; | ||
// Must be after setting overflow scroll | ||
var scrollbarWidth = target.offsetWidth - target.clientWidth + 1; // Plus one fixes safari pixelbug | ||
var scrollbarHeight = target.offsetHeight - target.clientHeight + 1; // Plus one fixes safari pixelbug | ||
// Calculate scrollBareSizes for hiding | ||
// Must be after setting overflow:scroll | ||
// Default to 18px (max reports scrollbar size 0 when "auto hiding") | ||
// Plus one fixes safari pixelbug | ||
var scrollbarWidth = (target.offsetWidth - target.clientWidth || FALLBACK_SCROLLBAR_SIZE) + 1; | ||
var scrollbarHeight = (target.offsetHeight - target.clientHeight || FALLBACK_SCROLLBAR_SIZE) + 1; | ||
@@ -141,0 +145,0 @@ target.style.maxHeight = "calc(100% + " + scrollbarHeight + "px)"; // Consistent height |
@@ -9,2 +9,3 @@ import {name, version} from './package.json' | ||
const SIGNIFICANT_DRAG_THRESHOLD = 10 | ||
const FALLBACK_SCROLLBAR_SIZE = 18 | ||
const FRICTION = 0.8 | ||
@@ -27,5 +28,8 @@ const VELOCITY = 20 | ||
// Must be after setting overflow scroll | ||
const scrollbarWidth = target.offsetWidth - target.clientWidth + 1 // Plus one fixes safari pixelbug | ||
const scrollbarHeight = target.offsetHeight - target.clientHeight + 1 // Plus one fixes safari pixelbug | ||
// Calculate scrollBareSizes for hiding | ||
// Must be after setting overflow:scroll | ||
// Default to 18px (max reports scrollbar size 0 when "auto hiding") | ||
// Plus one fixes safari pixelbug | ||
const scrollbarWidth = (target.offsetWidth - target.clientWidth || FALLBACK_SCROLLBAR_SIZE) + 1 | ||
const scrollbarHeight = (target.offsetHeight - target.clientHeight || FALLBACK_SCROLLBAR_SIZE) + 1 | ||
@@ -32,0 +36,0 @@ target.style.maxHeight = `calc(100% + ${scrollbarHeight}px)` // Consistent height |
@@ -1,2 +0,2 @@ | ||
/*! @nrk/core-scroll v1.2.0 - Copyright (c) 2017-2018 NRK */ | ||
/*! @nrk/core-scroll v1.2.1 - Copyright (c) 2017-2018 NRK */ | ||
(function (global, factory) { | ||
@@ -12,3 +12,3 @@ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('react'), require('prop-types')) : | ||
var name = "@nrk/core-scroll"; | ||
var version = "1.2.0"; | ||
var version = "1.2.1"; | ||
@@ -140,2 +140,3 @@ var IS_BROWSER = typeof window !== 'undefined'; | ||
var SIGNIFICANT_DRAG_THRESHOLD = 10; | ||
var FALLBACK_SCROLLBAR_SIZE = 18; | ||
var FRICTION = 0.8; | ||
@@ -160,5 +161,8 @@ var VELOCITY = 20; | ||
// Must be after setting overflow scroll | ||
var scrollbarWidth = target.offsetWidth - target.clientWidth + 1; // Plus one fixes safari pixelbug | ||
var scrollbarHeight = target.offsetHeight - target.clientHeight + 1; // Plus one fixes safari pixelbug | ||
// Calculate scrollBareSizes for hiding | ||
// Must be after setting overflow:scroll | ||
// Default to 18px (max reports scrollbar size 0 when "auto hiding") | ||
// Plus one fixes safari pixelbug | ||
var scrollbarWidth = (target.offsetWidth - target.clientWidth || FALLBACK_SCROLLBAR_SIZE) + 1; | ||
var scrollbarHeight = (target.offsetHeight - target.clientHeight || FALLBACK_SCROLLBAR_SIZE) + 1; | ||
@@ -165,0 +169,0 @@ target.style.maxHeight = "calc(100% + " + scrollbarHeight + "px)"; // Consistent height |
@@ -1,2 +0,2 @@ | ||
/*! @nrk/core-scroll v1.2.0 - Copyright (c) 2017-2018 NRK */ | ||
/*! @nrk/core-scroll v1.2.1 - Copyright (c) 2017-2018 NRK */ | ||
(function (global, factory) { | ||
@@ -9,3 +9,3 @@ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : | ||
var name = "@nrk/core-scroll"; | ||
var version = "1.2.0"; | ||
var version = "1.2.1"; | ||
@@ -122,2 +122,3 @@ var IS_BROWSER = typeof window !== 'undefined'; | ||
var SIGNIFICANT_DRAG_THRESHOLD = 10; | ||
var FALLBACK_SCROLLBAR_SIZE = 18; | ||
var FRICTION = 0.8; | ||
@@ -142,5 +143,8 @@ var VELOCITY = 20; | ||
// Must be after setting overflow scroll | ||
var scrollbarWidth = target.offsetWidth - target.clientWidth + 1; // Plus one fixes safari pixelbug | ||
var scrollbarHeight = target.offsetHeight - target.clientHeight + 1; // Plus one fixes safari pixelbug | ||
// Calculate scrollBareSizes for hiding | ||
// Must be after setting overflow:scroll | ||
// Default to 18px (max reports scrollbar size 0 when "auto hiding") | ||
// Plus one fixes safari pixelbug | ||
var scrollbarWidth = (target.offsetWidth - target.clientWidth || FALLBACK_SCROLLBAR_SIZE) + 1; | ||
var scrollbarHeight = (target.offsetHeight - target.clientHeight || FALLBACK_SCROLLBAR_SIZE) + 1; | ||
@@ -147,0 +151,0 @@ target.style.maxHeight = "calc(100% + " + scrollbarHeight + "px)"; // Consistent height |
12
jsx.js
@@ -9,3 +9,3 @@ 'use strict'; | ||
var name = "@nrk/core-scroll"; | ||
var version = "1.2.0"; | ||
var version = "1.2.1"; | ||
@@ -137,2 +137,3 @@ var IS_BROWSER = typeof window !== 'undefined'; | ||
var SIGNIFICANT_DRAG_THRESHOLD = 10; | ||
var FALLBACK_SCROLLBAR_SIZE = 18; | ||
var FRICTION = 0.8; | ||
@@ -157,5 +158,8 @@ var VELOCITY = 20; | ||
// Must be after setting overflow scroll | ||
var scrollbarWidth = target.offsetWidth - target.clientWidth + 1; // Plus one fixes safari pixelbug | ||
var scrollbarHeight = target.offsetHeight - target.clientHeight + 1; // Plus one fixes safari pixelbug | ||
// Calculate scrollBareSizes for hiding | ||
// Must be after setting overflow:scroll | ||
// Default to 18px (max reports scrollbar size 0 when "auto hiding") | ||
// Plus one fixes safari pixelbug | ||
var scrollbarWidth = (target.offsetWidth - target.clientWidth || FALLBACK_SCROLLBAR_SIZE) + 1; | ||
var scrollbarHeight = (target.offsetHeight - target.clientHeight || FALLBACK_SCROLLBAR_SIZE) + 1; | ||
@@ -162,0 +166,0 @@ target.style.maxHeight = "calc(100% + " + scrollbarHeight + "px)"; // Consistent height |
@@ -5,3 +5,3 @@ { | ||
"author": "NRK <opensource@nrk.no> (https://www.nrk.no/)", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"license": "MIT", | ||
@@ -8,0 +8,0 @@ "main": "core-scroll.cjs.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
121355
1425