Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@behance/beff

Package Overview
Dependencies
Maintainers
14
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@behance/beff - npm Package Compare versions

Comparing version 9.0.0 to 9.1.0

.npmignore

34

Component/StickyPenScroller.js

@@ -15,2 +15,4 @@ define([

this.$context = options.$context;
this.leftBoundaryWidth = options.leftBoundaryWidth;
this.initialPenLeftPosition = null;

@@ -33,3 +35,5 @@ this.penTopPosForShortModules = -10;

this.$context.on('mouseup.stickyPenScroller', '.js-pen', function(e) {
this._adjustDropdownFromPen($(e.currentTarget));
var $pen = $(e.currentTarget);
this._checkAndSetLeftBoundaryForPen($pen);
this._adjustDropdownFromPen($pen);
}.bind(this));

@@ -55,2 +59,3 @@

$pen.css('top', offsettedScrollTop - moduleOffsetTop + this.penMargin);
this._checkAndSetLeftBoundaryForPen($pen);
this._fixDropDownPosition($dropdown, $pen);

@@ -60,5 +65,7 @@ }

$pen.css('top', this.penTopPosForShortModules);
this._checkAndSetLeftBoundaryForPen($pen);
}
else {
$pen.css('top', this.penMargin);
this._checkAndSetLeftBoundaryForPen($pen);
this._fixDropDownPosition($dropdown, $pen);

@@ -98,2 +105,3 @@ }

$dropdown.css('top', $pen.position().top + penHeight + this.dropDownMargin);
this._checkAndSetLeftBoundaryForDropdown($pen, $dropdown);
}.bind(this), 1);

@@ -103,2 +111,3 @@ }

$dropdown.css('top', $pen.position().top + penHeight + this.dropDownMargin);
this._checkAndSetLeftBoundaryForDropdown($pen, $dropdown);
},

@@ -112,2 +121,24 @@

_checkAndSetLeftBoundaryForPen: function($pen) {
if (this.leftBoundaryWidth) {
if (!this.initialPenLeftPosition) {
this.initialPenLeftPosition = $pen.position().left;
}
if ($pen.offset().left <= this.leftBoundaryWidth) {
$pen.css('left', (this.leftBoundaryWidth - $pen.offset().left) + $pen.position().left);
}
else {
$pen.css('left', this.initialPenLeftPosition);
}
}
},
_checkAndSetLeftBoundaryForDropdown: function($pen, $dropdown) {
if (this.leftBoundaryWidth) {
if ($pen.offset().left < this.leftBoundaryWidth + this.dropDownMargin) {
$dropdown.css('left', $pen.position().left + 1); // +1 to show left shadow of dropdown
}
}
},
_positionPenForShortModules: function() {

@@ -118,2 +149,3 @@ this.$modules.on('mouseenter.stickyPenScroller', function(e) {

this._checkAndSetLeftBoundaryForPen($pen);
if ($module.outerHeight() < $pen.outerHeight()) {

@@ -120,0 +152,0 @@ $pen.css('top', this.penTopPosForShortModules);

2

package.json
{
"name": "@behance/beff",
"version": "9.0.0",
"version": "9.1.0",
"description": "Behance Frontend Framework",

@@ -5,0 +5,0 @@ "directories": {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc