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

@atlaskit/layer

Package Overview
Dependencies
Maintainers
1
Versions
87
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@atlaskit/layer - npm Package Compare versions

Comparing version 5.0.4 to 5.0.5

4

CHANGELOG.md
# @atlaskit/layer
## 5.0.5
- [patch] Implement left offset position to fixed-position layer [8242529](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/8242529)
- [none] Updated dependencies [8242529](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/8242529)
## 5.0.4

@@ -4,0 +8,0 @@ - [patch] update the dependency of react-dom to 16.4.2 due to vulnerability in previous versions read https://reactjs.org/blog/2018/08/01/react-v-16-4-2.html for details [a4bd557](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/a4bd557)

13

dist/cjs/components/Layer.js

@@ -83,3 +83,3 @@ 'use strict';

var rect = actualTarget.getBoundingClientRect();
return '\n position: fixed;\n top: ' + fixedOffset + 'px;\n height: ' + rect.height + 'px;\n width: ' + rect.width + 'px;\n z-index: -1;\n ';
return '\n position: fixed;\n top: ' + fixedOffset.top + 'px;\n left: ' + fixedOffset.left + 'px;\n height: ' + rect.height + 'px;\n width: ' + rect.width + 'px;\n z-index: -1;\n ';
}

@@ -229,5 +229,12 @@ return 'display: none;';

var actualTarget = this.targetRef.firstChild;
this.setState({ fixedOffset: actualTarget.getBoundingClientRect().top });
this.setState({
fixedOffset: {
top: actualTarget.getBoundingClientRect().top,
left: actualTarget.getBoundingClientRect().left
}
});
} else if (!isAlwaysFixed && this.state.fixedOffset !== null) {
this.setState({ fixedOffset: null });
this.setState({
fixedOffset: null
});
}

@@ -234,0 +241,0 @@ }

@@ -33,3 +33,3 @@ import _extends from 'babel-runtime/helpers/extends';

var rect = actualTarget.getBoundingClientRect();
return '\n position: fixed;\n top: ' + fixedOffset + 'px;\n height: ' + rect.height + 'px;\n width: ' + rect.width + 'px;\n z-index: -1;\n ';
return '\n position: fixed;\n top: ' + fixedOffset.top + 'px;\n left: ' + fixedOffset.left + 'px;\n height: ' + rect.height + 'px;\n width: ' + rect.width + 'px;\n z-index: -1;\n ';
}

@@ -179,5 +179,12 @@ return 'display: none;';

var actualTarget = this.targetRef.firstChild;
this.setState({ fixedOffset: actualTarget.getBoundingClientRect().top });
this.setState({
fixedOffset: {
top: actualTarget.getBoundingClientRect().top,
left: actualTarget.getBoundingClientRect().left
}
});
} else if (!isAlwaysFixed && this.state.fixedOffset !== null) {
this.setState({ fixedOffset: null });
this.setState({
fixedOffset: null
});
}

@@ -184,0 +191,0 @@ }

{
"name": "@atlaskit/layer",
"version": "5.0.3"
"version": "5.0.4"
}
{
"name": "@atlaskit/layer",
"version": "5.0.4",
"version": "5.0.5",
"description": "A React layer component responsible for the position of an element on a page",

@@ -5,0 +5,0 @@ "license": "Apache-2.0",

Sorry, the diff of this file is not supported yet

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