1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 17:56:25 +00:00

Set color picker pos correctly such that it is restricted to the viewport

This commit is contained in:
Fabian Mueller
2016-08-10 17:28:16 +02:00
parent a01fd739bd
commit eed6bcc044
3 changed files with 65 additions and 14 deletions

View File

@@ -51,12 +51,15 @@ class StoragesTab extends React.Component {
}
renderList () {
let { storages } = this.props
let { storages, boundingBox } = this.props
if (!boundingBox) { return null }
let storageList = storages.map((storage) => {
return <StorageItem
key={storage.key}
storage={storage}
test={true}
hostBoundingBox={boundingBox}
/>
})
return (
@@ -217,6 +220,14 @@ class StoragesTab extends React.Component {
}
StoragesTab.propTypes = {
boundingBox: PropTypes.shape({
bottom: PropTypes.number,
height: PropTypes.number,
left: PropTypes.number,
right: PropTypes.number,
top: PropTypes.number,
width: PropTypes.number
}),
dispatch: PropTypes.func
}