提交 0800ec13 编写于 作者: A alteredq

Editor: made active camera changes be reflected in Object properties UI.

上级 23556896
......@@ -67,6 +67,7 @@
objectChanged: new SIGNALS.Signal(),
materialChanged: new SIGNALS.Signal(),
clearColorChanged: new SIGNALS.Signal(),
cameraChanged: new SIGNALS.Signal(),
windowResize: new SIGNALS.Signal()
};
......
......@@ -298,10 +298,28 @@ Sidebar.Properties.Object3D = function ( signals ) {
} );
signals.cameraChanged.add( function ( camera ) {
if ( camera && camera === selected ) {
refreshObjectUI( camera );
}
} );
signals.objectChanged.add( function ( object ) {
if ( object ) {
refreshObjectUI( object );
}
} );
function refreshObjectUI( object ) {
container.setDisplay( 'block' );
objectType.setValue( getObjectInstanceName( object ).toUpperCase() );
......@@ -342,8 +360,6 @@ Sidebar.Properties.Object3D = function ( signals ) {
}
} );
return container;
}
......@@ -172,6 +172,16 @@ var Viewport = function ( signals ) {
};
var onMouseMove = function ( event ) {
if ( controls.enabled ) {
signals.cameraChanged.dispatch( camera );
}
};
var onMouseUp = function ( event ) {
// clear selection when clicking in empty space
......@@ -213,6 +223,7 @@ var Viewport = function ( signals ) {
};
container.dom.addEventListener( 'mousemove', onMouseMove, false );
container.dom.addEventListener( 'mousedown', onMouseDown, false );
container.dom.addEventListener( 'mouseup', onMouseUp, false );
container.dom.addEventListener( 'click', onClick, false );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册