contain-by-screen
Advanced tools
Comparing version 1.1.1 to 1.2.0
@@ -43,6 +43,10 @@ 'use strict'; | ||
var positions = options.position && options.forcePosition ? [options.position] : (0, _uniq2.default)([options.position].filter(Boolean).concat(['top', 'bottom', 'left', 'right'])); | ||
var hAligns = options.hAlign && options.forceHAlign ? [options.hAlign] : (0, _uniq2.default)([options.hAlign].filter(Boolean).concat(['center', 'left', 'right'])); | ||
var vAligns = options.vAlign && options.forceVAlign ? [options.vAlign] : (0, _uniq2.default)([options.vAlign].filter(Boolean).concat(['center', 'top', 'bottom'])); | ||
var optionPositions = Array.isArray(options.position) ? options.position : [options.position].filter(Boolean); | ||
var optionHAligns = Array.isArray(options.hAlign) ? options.hAlign : [options.hAlign].filter(Boolean); | ||
var optionVAligns = Array.isArray(options.vAlign) ? options.vAlign : [options.vAlign].filter(Boolean); | ||
var positions = optionPositions.length > 0 && options.forcePosition ? optionPositions : (0, _uniq2.default)(optionPositions.concat(['top', 'bottom', 'left', 'right'])); | ||
var hAligns = optionHAligns.length > 0 && options.forceHAlign ? optionHAligns : (0, _uniq2.default)(optionHAligns.concat(['center', 'left', 'right'])); | ||
var vAligns = optionVAligns.length > 0 && options.forceVAlign ? optionVAligns : (0, _uniq2.default)(optionVAligns.concat(['center', 'top', 'bottom'])); | ||
var allPossibleChoices = (0, _flatten2.default)(positions.map(function (position) { | ||
@@ -76,5 +80,5 @@ return position === 'cover' ? (0, _flatten2.default)(hAligns.map(function (hAlign) { | ||
var _choice = { | ||
position: options.position || 'top', | ||
hAlign: options.hAlign || 'center', | ||
vAlign: options.vAlign || 'center' | ||
position: optionPositions[0] || 'top', | ||
hAlign: optionHAligns[0] || 'center', | ||
vAlign: optionVAligns[0] || 'center' | ||
}; | ||
@@ -191,2 +195,2 @@ choiceAndCoord = { | ||
module.exports = exports['default']; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLC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G9wID0gTWF0aC5yb3VuZChhbmNob3JSZWN0LnRvcCk7XG4gICAgICBicmVhaztcbiAgICBjYXNlICdib3R0b20nOlxuICAgICAgdG9wID0gTWF0aC5yb3VuZChhbmNob3JSZWN0LmJvdHRvbSAtIGVsUmVjdC5oZWlnaHQpO1xuICAgICAgYnJlYWs7XG4gICAgZGVmYXVsdDogdGhyb3cgbmV3IEVycm9yKCdTaG91bGQgbm90IGhhcHBlbicpO1xuICAgIH1cbiAgfVxuICByZXR1cm4ge3RvcCwgbGVmdH07XG59XG4iXX0= | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6WyJjb250YWluQnlTY3JlZW4iLCJlbGVtZW50IiwiYW5jaG9yUG9pbnQiLCJvcHRpb25zIiwicHJvY2VzcyIsImVudiIsIk5PREVfRU5WIiwid2luZG93IiwiZ2V0Q29tcHV0ZWRTdHlsZSIsInN0eWxlIiwicG9zaXRpb24iLCJjb25zb2xlIiwiZXJyb3IiLCJlbFJlY3QiLCJnZXRCb3VuZGluZ0NsaWVudFJlY3QiLCJhbmNob3JSZWN0IiwiYnVmZmVycyIsImFsbCIsImJ1ZmZlciIsInRvcCIsInRvcEJ1ZmZlciIsImJvdHRvbSIsImJvdHRvbUJ1ZmZlciIsImxlZnQiLCJsZWZ0QnVmZmVyIiwicmlnaHQiLCJyaWdodEJ1ZmZlciIsIm9wdGlvblBvc2l0aW9ucyIsIkFycmF5IiwiaXNBcnJheSIsImZpbHRlciIsIkJvb2xlYW4iLCJvcHRpb25IQWxpZ25zIiwiaEFsaWduIiwib3B0aW9uVkFsaWducyIsInZBbGlnbiIsInBvc2l0aW9ucyIsImxlbmd0aCIsImZvcmNlUG9zaXRpb24iLCJjb25jYXQiLCJoQWxpZ25zIiwiZm9yY2VIQWxpZ24iLCJ2QWxpZ25zIiwiZm9yY2VWQWxpZ24iLCJhbGxQb3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AncmlnaHQnOlxuICAgICAgbGVmdCA9IE1hdGguY2VpbChhbmNob3JSZWN0LnJpZ2h0ICsgYnVmZmVycy5hbGwgKyBidWZmZXJzLmxlZnQpO1xuICAgICAgYnJlYWs7XG4gICAgZGVmYXVsdDogdGhyb3cgbmV3IEVycm9yKCdTaG91bGQgbm90IGhhcHBlbicpO1xuICAgIH1cbiAgICBzd2l0Y2ggKHZBbGlnbikge1xuICAgIGNhc2UgJ2NlbnRlcic6XG4gICAgICB0b3AgPSBNYXRoLnJvdW5kKChhbmNob3JSZWN0LnRvcCArIGFuY2hvclJlY3QuYm90dG9tIC0gZWxSZWN0LmhlaWdodCkvMik7XG4gICAgICBicmVhaztcbiAgICBjYXNlICd0b3AnOlxuICAgICAgdG9wID0gTWF0aC5yb3VuZChhbmNob3JSZWN0LnRvcCk7XG4gICAgICBicmVhaztcbiAgICBjYXNlICdib3R0b20nOlxuICAgICAgdG9wID0gTWF0aC5yb3VuZChhbmNob3JSZWN0LmJvdHRvbSAtIGVsUmVjdC5oZWlnaHQpO1xuICAgICAgYnJlYWs7XG4gICAgZGVmYXVsdDogdGhyb3cgbmV3IEVycm9yKCdTaG91bGQgbm90IGhhcHBlbicpO1xuICAgIH1cbiAgfVxuICByZXR1cm4ge3RvcCwgbGVmdH07XG59XG4iXX0= |
{ | ||
"name": "contain-by-screen", | ||
"version": "1.1.1", | ||
"version": "1.2.0", | ||
"description": "Position a dropdown element near a button in a way that fits on the screen.", | ||
@@ -5,0 +5,0 @@ "main": "js/index.js", |
@@ -25,5 +25,6 @@ # contain-by-screen | ||
`position` sets the prioritized position for the target relative to its anchor. | ||
It may be set to null, "top", "bottom", "left", "right", or "cover". The | ||
element will use this position unless it is not possible to do so while fitting | ||
the element on-screen. | ||
It may be set to null, "top", "bottom", "left", "right", "cover", or an array | ||
of some of those string values. The element will attempt to use this position | ||
(or each value in the array in order) unless it is not possible to do so while | ||
fitting the element on-screen. | ||
@@ -37,5 +38,6 @@ `forcePosition` is a boolean which controls whether the configured position | ||
causes the element to be moved horizontally in order to make a specific edge | ||
align. It may be set to null, "center", "left", or "right". The element will | ||
use this alignment unless it is not possible to do so while fitting the element | ||
on-screen. | ||
align. It may be set to null, "center", "left", "right", or an array of some of | ||
those string values. The element will attempt to use this alignment (or each | ||
value in the array in order) unless it is not possible to do so while fitting | ||
the element on-screen. | ||
@@ -49,4 +51,5 @@ `forceHAlign` is a boolean which controls whether the configured hAlign value | ||
element to be moved vertically in order to make a specific edge align. It may | ||
be set to null, "center", "top", or "bottom". The element will use this | ||
alignment unless it is not possible to do so while fitting the element | ||
be set to null, "center", "top", "bottom", or an array of some of those string | ||
values. The element will attempt to use this alignment (or each value in the | ||
array in order) unless it is not possible to do so while fitting the element | ||
on-screen. | ||
@@ -53,0 +56,0 @@ |
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
38652
79
11
204