jscad / OpenJSCAD.org

JSCAD is an open source set of modular, browser and command line tools for creating parametric 2D and 3D designs with JavaScript code. It provides a quick, precise and reproducible method for generating 3D models, and is especially useful for 3D printing applications.
https://openjscad.xyz/
MIT License
2.7k stars 517 forks source link

Allow resizing of editFrame by dragging editHandle #387

Open gnbl opened 6 years ago

gnbl commented 6 years ago

editFrame (https://github.com/jscad/OpenJSCAD.org/blob/master/packages/web/index.html#L124) seems to get set to "width: 40%" but I'd rather have it resizable by dragging editHandle.

However, it can easily be manipulated using a little JavaScript via the Browser's console, e.g. document.getElementById("editFrame").style.width="33%"; or via address bar / bookmarklet as javascript:(function(){document.getElementById("editFrame").style.width="33%"})() (the browser might strip javascript when pasting).

aldenrogers commented 8 months ago

Agree this would be really handy. Current default seems to be 50% which is always covering half of a model centered on the origin.

For anyone else coming across this seems like the proper way to mess with it now in browser console is getElementById("editor"). (Also TIL you can shift-click to pan.)

aldenrogers commented 8 months ago

Also handy: just setting resize: horizontal CSS on the editor section makes it click-and-drag resizable, though you have to drag at the bottom-right corner which is pretty goofy. There seem to be some annoying hacks possible to relocate that corner: https://stackoverflow.com/questions/35702705/is-there-a-way-to-change-the-css-resize-corners-position.

hrgdavor commented 8 months ago

@aldenrogers UI improvements in recent years have been moved to a separate prototype, as there are no volunteers that would tackle the current openscad web UI that is done with some weird streaming library.

https://github.com/hrgdavor/jscadui/ and demo app: https://jscad.app has the resizing feature mentioned here.