Skip to content

Commit

Permalink
#227 definitely set black background
Browse files Browse the repository at this point in the history
  • Loading branch information
matej-vavrek committed Apr 1, 2020
1 parent 2e5588d commit c55cb62
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion js/components/nglView/nglView.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ const NglView = memo(({ div_id, height, setOrientation, removeAllNglComponents,
const nglViewFromContext = getNglView(div_id);
if (stage === undefined && !nglViewFromContext) {
const newStage = new Stage(div_id);
newStage.setParameters({ [NGL_PARAMS.backgroundColor]: BACKGROUND_COLOR.white });
newStage.setParameters({ [NGL_PARAMS.backgroundColor]: BACKGROUND_COLOR.black });
registerNglView(div_id, newStage);
registerStageEvents(newStage, getNglView);
setStage(newStage);
Expand Down
4 changes: 4 additions & 0 deletions js/reducers/ngl/dispatchActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ export const setOrientation = (div_id, orientation) => (dispatch, getState) => {
isEmpty(nglOrientations) ||
(nglOrientations && nglOrientations[div_id] === undefined))
) {
// TODO Zoom out (about 2x demagnification) from whatever value it currently calculates
orientation.elements[0] = 10 + orientation.elements[0];
orientation.elements[5] = 10 + orientation.elements[5];
orientation.elements[10] = 10 + orientation.elements[10];
dispatch(setNglOrientation(orientation, div_id));
}
};
Expand Down

0 comments on commit c55cb62

Please sign in to comment.