Skip to content

Commit

Permalink
bring over custom overlays from TW
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyGamer13 committed Aug 31, 2023
1 parent f02c1bf commit a39d0cd
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/components/stage/stage.css
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ stage doesn't "spill" out from under its rounded corners. instead, shift these o
left: 0;
pointer-events: none;
}
.custom-overlays {
position: absolute;
top: 0;
left: 0;
}

.dragging-sprite {
position: absolute;
Expand Down
4 changes: 4 additions & 0 deletions src/components/stage/stage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ const StageComponent = props => {
}}
{...boxProps}
/>
<Box className={styles.customOverlays}>
<DOMElementRenderer domElement={props.overlay} />
</Box>
<Box className={styles.monitorWrapper}>
<MonitorList
draggable={useEditorDragStyle}
Expand Down Expand Up @@ -150,6 +153,7 @@ StageComponent.propTypes = {
width: PropTypes.number,
height: PropTypes.number
}),
overlay: PropTypes.instanceOf(Element).isRequired,
colorInfo: Loupe.propTypes.colorInfo,
dragRef: PropTypes.func,
isColorPicking: PropTypes.bool,
Expand Down
1 change: 1 addition & 0 deletions src/containers/stage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,7 @@ class Stage extends React.Component {
return (
<StageComponent
canvas={this.canvas}
overlay={this.props.vm.runtime.renderer.overlayContainer}
colorInfo={this.state.colorInfo}
dragRef={this.setDragCanvas}
question={this.state.question}
Expand Down

0 comments on commit a39d0cd

Please sign in to comment.