Skip to content
Snippets Groups Projects
Commit 50945493 authored by David Sehnal's avatar David Sehnal
Browse files

fix canvas3d.setProps

parent fa80c479
No related branches found
No related tags found
No related merge requests found
...@@ -607,12 +607,9 @@ namespace Canvas3D { ...@@ -607,12 +607,9 @@ namespace Canvas3D {
if (props.transparentBackground !== undefined) p.transparentBackground = props.transparentBackground; if (props.transparentBackground !== undefined) p.transparentBackground = props.transparentBackground;
if (props.viewport !== undefined) { if (props.viewport !== undefined) {
const doNotUpdate = p.viewport === props.viewport || const doNotUpdate = p.viewport === props.viewport ||
(p.viewport.name && p.viewport.name && shallowEqual(p.viewport.params, p.viewport.params)); (p.viewport.name === props.viewport.name && shallowEqual(p.viewport.params, props.viewport.params));
if (!doNotUpdate) { if (!doNotUpdate) {
// clear old viewport
renderer.setViewport(x, y, width, height);
renderer.clear(p.transparentBackground);
p.viewport = props.viewport; p.viewport = props.viewport;
updateViewport(); updateViewport();
syncViewport(); syncViewport();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment