re-add scale, rotation, file recent
This commit is contained in:
parent
52eca70376
commit
ab7ea82b4d
4 changed files with 102 additions and 62 deletions
|
|
@ -1008,7 +1008,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateCatalog(files) {
|
function updateCatalog(files) {
|
||||||
return console.log('TODO catalog render');
|
|
||||||
let table = UI.catalogList,
|
let table = UI.catalogList,
|
||||||
list = [];
|
list = [];
|
||||||
table.innerHTML = '';
|
table.innerHTML = '';
|
||||||
|
|
@ -1040,8 +1039,6 @@
|
||||||
row.appendChild(del);
|
row.appendChild(del);
|
||||||
table.appendChild(row);
|
table.appendChild(row);
|
||||||
}
|
}
|
||||||
// fix layer scroll size
|
|
||||||
API.dialog.update();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// MAIN INITIALIZATION FUNCTION
|
// MAIN INITIALIZATION FUNCTION
|
||||||
|
|
@ -1467,22 +1464,22 @@
|
||||||
SPACE.onEnterKey([
|
SPACE.onEnterKey([
|
||||||
// UI.layerSpan, function() { API.show.slices() },
|
// UI.layerSpan, function() { API.show.slices() },
|
||||||
// UI.layerID, function() { API.show.layer(UI.layerID.value) },
|
// UI.layerID, function() { API.show.layer(UI.layerID.value) },
|
||||||
// UI.scaleX, selectionScale,
|
UI.scaleX, selectionScale,
|
||||||
// UI.scaleY, selectionScale,
|
UI.scaleY, selectionScale,
|
||||||
// UI.scaleZ, selectionScale,
|
UI.scaleZ, selectionScale,
|
||||||
// UI.sizeX, selectionSize,
|
UI.sizeX, selectionSize,
|
||||||
// UI.sizeY, selectionSize,
|
UI.sizeY, selectionSize,
|
||||||
// UI.sizeZ, selectionSize,
|
UI.sizeZ, selectionSize,
|
||||||
// UI.toolName, updateTool,
|
UI.toolName, updateTool,
|
||||||
// UI.toolNum, updateTool,
|
UI.toolNum, updateTool,
|
||||||
// UI.toolFluteDiam, updateTool,
|
UI.toolFluteDiam, updateTool,
|
||||||
// UI.toolFluteLen, updateTool,
|
UI.toolFluteLen, updateTool,
|
||||||
// UI.toolShaftDiam, updateTool,
|
UI.toolShaftDiam, updateTool,
|
||||||
// UI.toolShaftLen, updateTool,
|
UI.toolShaftLen, updateTool,
|
||||||
// UI.toolTaperTip, updateTool,
|
UI.toolTaperTip, updateTool,
|
||||||
// $('rot_x'), selectionRotate,
|
$('rot_x'), selectionRotate,
|
||||||
// $('rot_y'), selectionRotate,
|
$('rot_y'), selectionRotate,
|
||||||
// $('rot_z'), selectionRotate
|
$('rot_z'), selectionRotate
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// UI.layerID.convert = UC.toFloat.bind(UI.layerID);
|
// UI.layerID.convert = UC.toFloat.bind(UI.layerID);
|
||||||
|
|
|
||||||
|
|
@ -847,12 +847,12 @@
|
||||||
});
|
});
|
||||||
if (bounds.min.x === Infinity) {
|
if (bounds.min.x === Infinity) {
|
||||||
if (selectedMeshes.length === 0) {
|
if (selectedMeshes.length === 0) {
|
||||||
// UI.sizeX.value = 0;
|
UI.sizeX.value = 0;
|
||||||
// UI.sizeY.value = 0;
|
UI.sizeY.value = 0;
|
||||||
// UI.sizeZ.value = 0;
|
UI.sizeZ.value = 0;
|
||||||
// UI.scaleX.value = 1;
|
UI.scaleX.value = 1;
|
||||||
// UI.scaleY.value = 1;
|
UI.scaleY.value = 1;
|
||||||
// UI.scaleZ.value = 1;
|
UI.scaleZ.value = 1;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -860,12 +860,12 @@
|
||||||
dy = bounds.max.y - bounds.min.y,
|
dy = bounds.max.y - bounds.min.y,
|
||||||
dz = bounds.max.z - bounds.min.z,
|
dz = bounds.max.z - bounds.min.z,
|
||||||
scale = unitScale();
|
scale = unitScale();
|
||||||
// UI.sizeX.value = UI.sizeX.was = UTIL.round(dx/scale,2);
|
UI.sizeX.value = UI.sizeX.was = UTIL.round(dx/scale,2);
|
||||||
// UI.sizeY.value = UI.sizeY.was = UTIL.round(dy/scale,2);
|
UI.sizeY.value = UI.sizeY.was = UTIL.round(dy/scale,2);
|
||||||
// UI.sizeZ.value = UI.sizeZ.was = UTIL.round(dz/scale,2);
|
UI.sizeZ.value = UI.sizeZ.was = UTIL.round(dz/scale,2);
|
||||||
// UI.scaleX.value = UI.scaleX.was = track.scale.x;
|
UI.scaleX.value = UI.scaleX.was = track.scale.x;
|
||||||
// UI.scaleY.value = UI.scaleY.was = track.scale.y;
|
UI.scaleY.value = UI.scaleY.was = track.scale.y;
|
||||||
// UI.scaleZ.value = UI.scaleZ.was = track.scale.z;
|
UI.scaleZ.value = UI.scaleZ.was = track.scale.z;
|
||||||
}
|
}
|
||||||
|
|
||||||
function setOpacity(value) {
|
function setOpacity(value) {
|
||||||
|
|
@ -1655,7 +1655,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function hideModal() {
|
function hideModal() {
|
||||||
// console.trace({hideModal: modalShowing()});
|
|
||||||
if (!modalShowing()) {
|
if (!modalShowing()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -1715,20 +1714,11 @@
|
||||||
// associate named process with the current device
|
// associate named process with the current device
|
||||||
settings.devproc[currentDeviceName()] = name;
|
settings.devproc[currentDeviceName()] = name;
|
||||||
|
|
||||||
// update selection display
|
|
||||||
// $('selected-mode').innerHTML = API.mode.get();
|
|
||||||
// $('selected-device').innerHTML = API.device.get();
|
|
||||||
// $('selected-process').innerHTML = name;
|
|
||||||
|
|
||||||
// FDM process settings overridden by device
|
// FDM process settings overridden by device
|
||||||
if (mode == "FDM") {
|
if (mode == "FDM") {
|
||||||
settings.process.outputOriginCenter = (settings.device.originCenter || false);
|
settings.process.outputOriginCenter = (settings.device.originCenter || false);
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (!named) {
|
|
||||||
// hideModal();
|
|
||||||
// }
|
|
||||||
|
|
||||||
updateFields();
|
updateFields();
|
||||||
API.conf.update();
|
API.conf.update();
|
||||||
if (e) triggerSettingsEvent();
|
if (e) triggerSettingsEvent();
|
||||||
|
|
@ -1800,7 +1790,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function showHelpFile(local) {
|
function showHelpFile(local) {
|
||||||
// hideModal();
|
|
||||||
if (!local) {
|
if (!local) {
|
||||||
WIN.open("//wiki.grid.space/wiki/Kiri:Moto", "_help");
|
WIN.open("//wiki.grid.space/wiki/Kiri:Moto", "_help");
|
||||||
return;
|
return;
|
||||||
|
|
@ -1949,14 +1938,6 @@
|
||||||
cl.remove("dev-sel");
|
cl.remove("dev-sel");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// UI.modeFDM.setAttribute('class', MODE === MODES.FDM ? 'buton' : '');
|
|
||||||
// UI.modeSLA.setAttribute('class', MODE === MODES.SLA ? 'buton' : '');
|
|
||||||
// UI.modeCAM.setAttribute('class', MODE === MODES.CAM ? 'buton' : '');
|
|
||||||
// UI.modeLASER.setAttribute('class', MODE === MODES.LASER ? 'buton' : '');
|
|
||||||
// UI.mode.style.display = lock ? 'none' : '';
|
|
||||||
// UI.modeTable.style.display = lock ? 'none' : '';
|
|
||||||
// UI.modelOpacity.style.display = MODE === MODES.SLA ? 'none' : '';
|
|
||||||
// UI.modePreview.style.display = MODE === MODES.SLA ? 'none' : '';
|
|
||||||
if (camStock) {
|
if (camStock) {
|
||||||
camStock.material.visible = settings.mode === 'CAM';
|
camStock.material.visible = settings.mode === 'CAM';
|
||||||
}
|
}
|
||||||
|
|
@ -1977,8 +1958,6 @@
|
||||||
|
|
||||||
function setControlsVisible(show) {
|
function setControlsVisible(show) {
|
||||||
console.log('TODO setControlsVisible');
|
console.log('TODO setControlsVisible');
|
||||||
// UI.ctrlLeft.style.display = show ? 'block' : 'none';
|
|
||||||
// UI.ctrlRight.style.display = show ? 'block' : 'none';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// prevent safari from exiting full screen mode
|
// prevent safari from exiting full screen mode
|
||||||
|
|
|
||||||
|
|
@ -53,12 +53,16 @@ input {
|
||||||
margin-bottom: 1px;
|
margin-bottom: 1px;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
border: 1px solid #bbb;
|
border: 1px solid #bbb;
|
||||||
|
padding-top: 0;
|
||||||
|
padding-bottom: 0;
|
||||||
|
margin-top: 1px;
|
||||||
|
margin-bottom: 1px;
|
||||||
}
|
}
|
||||||
input:focus {
|
input:focus {
|
||||||
background-color: #fec;
|
background-color: #fec;
|
||||||
}
|
}
|
||||||
input[disabled] {
|
input[disabled] {
|
||||||
background-color: #ccc;
|
background-color: #ddd;
|
||||||
color: #000;
|
color: #000;
|
||||||
border-width: 1px;
|
border-width: 1px;
|
||||||
}
|
}
|
||||||
|
|
@ -132,6 +136,12 @@ th, tr, td {
|
||||||
.space-between {
|
.space-between {
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
.center {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.russo {
|
||||||
|
font-family: 'Russo One', sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
:-moz-any() {
|
:-moz-any() {
|
||||||
overflow-x: hidden !important;
|
overflow-x: hidden !important;
|
||||||
|
|
@ -478,6 +488,10 @@ th, tr, td {
|
||||||
.t-33 {
|
.t-33 {
|
||||||
width: 33%;
|
width: 33%;
|
||||||
}
|
}
|
||||||
|
.fillh {
|
||||||
|
top: 0;
|
||||||
|
bottom: 0;
|
||||||
|
}
|
||||||
.t-group {
|
.t-group {
|
||||||
background-image: var(--gradbar);
|
background-image: var(--gradbar);
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
|
@ -503,13 +517,17 @@ th, tr, td {
|
||||||
width: 10px;
|
width: 10px;
|
||||||
}
|
}
|
||||||
#devices {
|
#devices {
|
||||||
width: 150px;
|
width: 200px;
|
||||||
}
|
}
|
||||||
#device {
|
#device {
|
||||||
width: 225px;
|
width: 200px;
|
||||||
}
|
}
|
||||||
#gcode-edit {
|
#gcode-edit {
|
||||||
width: 225px;
|
width: 200px;
|
||||||
|
}
|
||||||
|
#dev-gcode textarea {
|
||||||
|
font-family: monospace;
|
||||||
|
width: 100%;
|
||||||
}
|
}
|
||||||
#device-action, #tool-action {
|
#device-action, #tool-action {
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
|
|
@ -518,6 +536,11 @@ th, tr, td {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
#catalogList {
|
||||||
|
min-width: 150px;
|
||||||
|
height: 350px;
|
||||||
|
overflow-y: scroll;
|
||||||
|
}
|
||||||
|
|
||||||
#slider {
|
#slider {
|
||||||
display: none;
|
display: none;
|
||||||
|
|
@ -645,6 +668,14 @@ th, tr, td {
|
||||||
padding: 2px 4px 2px 0;
|
padding: 2px 4px 2px 0;
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
}
|
}
|
||||||
|
.var-row input {
|
||||||
|
margin-right: 0;
|
||||||
|
margin-bottom: 1px;
|
||||||
|
}
|
||||||
|
.var-row button {
|
||||||
|
margin-right: 0;
|
||||||
|
margin-bottom: 1px;
|
||||||
|
}
|
||||||
.table-row {
|
.table-row {
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
align-items: stretch;
|
align-items: stretch;
|
||||||
|
|
|
||||||
|
|
@ -120,21 +120,51 @@
|
||||||
<div id="lt-rotate" class="lt-menu noshow">
|
<div id="lt-rotate" class="lt-menu noshow">
|
||||||
<i class="fas fa-sync-alt"></i>
|
<i class="fas fa-sync-alt"></i>
|
||||||
<label>rotate</label>
|
<label>rotate</label>
|
||||||
<div id="pop-rotate" class="pop-lcol row">
|
<div id="pop-rotate" class="pop-lcol row fillh russo">
|
||||||
|
<div>
|
||||||
|
<label class="grow">X</label>
|
||||||
|
<input id="rot_x" class="value center" size="5"/ value="0">
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label class="grow">Y</label>
|
||||||
|
<input id="rot_y" class="value center" size="5"/ value="0">
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label class="grow">Z</label>
|
||||||
|
<input id="rot_z" class="value center" size="5"/ value="0">
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="lt-scale" class="lt-menu noshow">
|
<div id="lt-scale" class="lt-menu noshow">
|
||||||
<i class="fas fa-expand"></i>
|
<i class="fas fa-expand"></i>
|
||||||
<label>scale</label>
|
<label>scale</label>
|
||||||
<div id="pop-scale" class="pop-lcol row">
|
<div id="pop-scale" class="pop-lcol row fillh russo">
|
||||||
|
<div>
|
||||||
|
<div><label>X</label><input id="lock_x" type="checkbox" checked/></div>
|
||||||
|
<div><input id="size_x" size="8" class="value"/></div>
|
||||||
|
<div><input id="scale_x" size="8" class="value" value="1"/></div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div><label>Y</label><input id="lock_y" type="checkbox" checked/></div>
|
||||||
|
<div><input id="size_y" size="8" class="value"/></div>
|
||||||
|
<div><input id="scale_y" size="8" class="value" value="1"/></div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div><label>Z</label><input id="lock_z" type="checkbox" checked/></div>
|
||||||
|
<div><input id="size_z" size="8" class="value"/></div>
|
||||||
|
<div><input id="scale_z" size="8" class="value" value="1"/></div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div><label>axis</label></div>
|
||||||
|
<div><label>size</label></div>
|
||||||
|
<div><label>scale</label></div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="lt-nozzle" class="lt-menu noshow">
|
<div id="lt-nozzle" class="lt-menu noshow">
|
||||||
<i class="fas fa-map-marker"></i>
|
<i class="fas fa-map-marker"></i>
|
||||||
<label>nozzle</label>
|
<label>nozzle</label>
|
||||||
<div id="pop-nozzle" class="pop-lcol row"></div>
|
<div id="pop-nozzle" class="pop-lcol row fillh"></div>
|
||||||
</div>
|
</div>
|
||||||
<div id="lt-end"></div>
|
<div id="lt-end"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -180,7 +210,10 @@
|
||||||
<div class="grow"></div>
|
<div class="grow"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="mod-files" class="mdialog"></div>
|
<div id="mod-files" class="mdialog col">
|
||||||
|
<label class="t-group">recent files</label>
|
||||||
|
<div id="catalogList" class="col"></div>
|
||||||
|
</div>
|
||||||
<div id="mod-tools" class="mdialog">
|
<div id="mod-tools" class="mdialog">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<div class="row t-head">
|
<div class="row t-head">
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue