fix update after dim change and constant axes size
parent
5bde0fb599
commit
e23985a80f
|
@ -364,6 +364,7 @@ function render() {
|
|||
this.camera.left = -canvas.clientWidth / canvas.clientHeight;
|
||||
this.camera.right = canvas.clientWidth / canvas.clientHeight;
|
||||
this.camera.updateProjectionMatrix();
|
||||
console.log(this.camera.zoom)
|
||||
|
||||
this.controls.handleResize()
|
||||
Object.assign(this.rect, this.canvas.getBoundingClientRect().toJSON())
|
||||
|
@ -371,7 +372,7 @@ function render() {
|
|||
}
|
||||
|
||||
|
||||
if (this.axes) this.axes.resize(this.camera.zoom)
|
||||
if (this.axes) this.axes.resize(this.camera.zoom, this.canvas.clientHeight)
|
||||
|
||||
this.renderer.render(this.obj3d, this.camera);
|
||||
|
||||
|
|
|
@ -32,8 +32,8 @@ class AxesHelper extends THREE.Object3D {
|
|||
return this
|
||||
}
|
||||
|
||||
resize(zoom) {
|
||||
const scale = this.initialZoom / zoom
|
||||
resize(zoom, canvH) {
|
||||
const scale = this.initialZoom / zoom * 1000/canvH
|
||||
|
||||
for (let i = 0; i < this.children.length; i++) {
|
||||
this.children[i].setLength(
|
||||
|
|
|
@ -179,6 +179,7 @@ export function updateDim(c_id) {
|
|||
this.scene.render()
|
||||
ev_focus.target.blur()
|
||||
this.updateBoundingSpheres()
|
||||
this.hasChanged = true
|
||||
} else if (e.key == 'Escape') {
|
||||
ev_focus.target.textContent = value
|
||||
getSelection().empty()
|
||||
|
|
Loading…
Reference in New Issue