mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-27 02:43:04 +01:00
coordinates info
This commit is contained in:
parent
de256acb96
commit
cb114b7baa
3 changed files with 25 additions and 8 deletions
|
|
@ -27,17 +27,21 @@ function App2D() {
|
|||
this._actionsOrder = [];
|
||||
|
||||
var dockEl = $('#dock');
|
||||
var statusEl = $('#status');
|
||||
this.dock = new ui.Dock(dockEl, statusEl, App2D.views);
|
||||
var buttonGroup = $('#status .button-group');
|
||||
this.dock = new ui.Dock(dockEl, buttonGroup, App2D.views);
|
||||
this.dock.show('Constraints');
|
||||
|
||||
var consoleBtn = ui.dockBtn('Commands', 'list');
|
||||
statusEl.append(consoleBtn);
|
||||
buttonGroup.append(consoleBtn);
|
||||
var commandsWin = new ui.Window($('#commands'), this.winManager);
|
||||
commandsWin.tileUpRelative = $('#viewer');
|
||||
consoleBtn.click(function() {
|
||||
commandsWin.toggle();
|
||||
});
|
||||
$(document).on('mousemove', '#viewer', (e) => {
|
||||
let coord = this.viewer.screenToModel(e);
|
||||
$('.coordinates-info').text(coord.x.toFixed(3) + " : " + coord.y.toFixed(3));
|
||||
});
|
||||
new ui.Terminal(commandsWin, function(command) {
|
||||
return "Command " + command + " executed";
|
||||
});
|
||||
|
|
|
|||
|
|
@ -55,9 +55,6 @@ html, body {
|
|||
border:0 solid black;
|
||||
background: #606060 no-repeat center;
|
||||
border-radius: 4px;
|
||||
color: white;
|
||||
font-size: 11px;
|
||||
font-family: 'Helvetica Neue Light', HelveticaNeue-Light, 'Helvetica Neue', Helvetica, sans-serif;
|
||||
cursor: pointer;
|
||||
margin: 1px 4px 1px 4px;
|
||||
}
|
||||
|
|
@ -303,4 +300,16 @@ html, body {
|
|||
|
||||
input[type=checkbox], input[type=radio] {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
#status {
|
||||
font-family: 'Helvetica Neue Light', HelveticaNeue-Light, 'Helvetica Neue', Helvetica, sans-serif;
|
||||
color: white;
|
||||
font-size: 11px;
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
#status .coordinates-info {
|
||||
padding-right: 5px;
|
||||
font-style: italic;
|
||||
}
|
||||
|
|
@ -64,8 +64,12 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div id="status" class="panel b-top" style="width: 100%; height:22px; padding-top: 3px;"><span
|
||||
id='showActions' class="dock-btn"><i class="fa fa-slack"></i></span></div>
|
||||
<div id="status" class="panel b-top" style="width: 100%; height:22px;">
|
||||
<div class="button-group" style="float: left">
|
||||
<span id='showActions' class="dock-btn" ><i class="fa fa-slack"></i></span>
|
||||
</div>
|
||||
<div class="coordinates-info" style="float: right"></div>
|
||||
</div>
|
||||
|
||||
<div id="actions" class="scroll win" style="display: none;">
|
||||
<div class="tool-caption" >ACTIONS</div>
|
||||
|
|
|
|||
Loading…
Reference in a new issue