fix stock and compact displat issues

This commit is contained in:
Stewart Allen 2020-04-11 10:29:19 -04:00
commit 0ca8c1ce22
4 changed files with 27 additions and 10 deletions

View file

@ -1592,6 +1592,10 @@ var gs_kiri_init = exports;
settings().device.bedHeight settings().device.bedHeight
); );
if (compact) {
UI.selection.classList.add('compact');
}
if (dark) { if (dark) {
SPACE.platform.setGrid(25, 5, 0x999999, 0x333333); SPACE.platform.setGrid(25, 5, 0x999999, 0x333333);
SPACE.platform.opacity(0.8); SPACE.platform.opacity(0.8);

View file

@ -997,7 +997,7 @@ self.kiri.copyright = exports.COPYRIGHT;
function platformUpdateSelected() { function platformUpdateSelected() {
UI.selection.style.display = platform.selected_count() ? 'inline' : 'none'; UI.selection.style.display = platform.selected_count() ? 'inline' : 'none';
$('ext-sel').style.display = (MODE === MODES.FDM) ? 'inline' : 'none'; $('ext-sel').style.display = (MODE === MODES.FDM) ? 'inline-block' : 'none';
let extruders = settings.device.extruders; let extruders = settings.device.extruders;
if (extruders) { if (extruders) {
for (let i=0; i<extruders.length; i++) { for (let i=0; i<extruders.length; i++) {
@ -1200,7 +1200,7 @@ self.kiri.copyright = exports.COPYRIGHT;
camTopZ = topZ; camTopZ = topZ;
// create/inject cam stock if stock size other than default // create/inject cam stock if stock size other than default
if (MODE === MODES.CAM && stockSet && WIDGETS.length) { if (MODE === MODES.CAM && stockSet && WIDGETS.length) {
UI.stock.style.display = offset ? 'inline' : 'none'; UI.stock.style.display = offset ? 'inline-block' : 'none';
let csx = sd.camStockX * scale; let csx = sd.camStockX * scale;
let csy = sd.camStockY * scale; let csy = sd.camStockY * scale;
let csz = sd.camStockZ * scale; let csz = sd.camStockZ * scale;

View file

@ -155,7 +155,7 @@
<div id="selection"> <div id="selection">
<span class="sel-span"> <span class="sel-span">
<label class="label">scale</label> <label class="label">scale</label>
<div id="sel-scale" class="sel-pop"> <div class="sel-pop">
<table> <table>
<tr> <tr>
<th></th> <th></th>
@ -186,7 +186,7 @@
</span> </span>
<span class="sel-span"> <span class="sel-span">
<label class="label">rotate</label> <label class="label">rotate</label>
<div id="sel-rotate" class="sel-pop"> <div class="sel-pop">
<table> <table>
<tr><td> <tr><td>
<label>z</label> <label>z</label>
@ -207,14 +207,14 @@
<label class="label">extruder</label> <label class="label">extruder</label>
<div class="sel-pop"><div id="sel-ext"></div></div> <div class="sel-pop"><div id="sel-ext"></div></div>
</span> </span>
</div> <span id="stock" class="sel-span">
<span id="stock">
<label class="label">stock</label> <label class="label">stock</label>
<label id="stock-width" class="value">mm</label> x <label id="stock-width" class="value">mm</label> x
<label id="stock-depth" class="value">mm</label> x <label id="stock-depth" class="value">mm</label> x
<label id="stock-height" class="value">mm</label> <label id="stock-height" class="value">mm</label>
</span> </span>
</div> </div>
</div>
<!-- layer slider --> <!-- layer slider -->
<div id="layer-view" class="flow-row"> <div id="layer-view" class="flow-row">
<button id="layer-toggle" title="toggle layers">layers</button> <button id="layer-toggle" title="toggle layers">layers</button>

View file

@ -72,6 +72,13 @@ input[type=range]::-moz-focus-outer {
.sel-span:hover .sel-pop { .sel-span:hover .sel-pop {
display: block; display: block;
} }
.compact .sel-span label {
font-size: 24px;
}
.compact .sel-span input {
font-size: 18px;
margin: 4px;
}
#widget-info { #widget-info {
text-align: center; text-align: center;
position: fixed; position: fixed;
@ -113,6 +120,12 @@ input[type=range]::-moz-focus-outer {
#stock,#selection { #stock,#selection {
display: none; display: none;
} }
#stock label {
background-color: transparent !important;
}
#selection {
background-color: transparent !important;
}
#container { #container {
width: 100%; width: 100%;
height: 100%; height: 100%;