set coordinate origin button implemented
This commit is contained in:
parent
901e63aef9
commit
9e2abc3632
4 changed files with 27 additions and 4 deletions
|
|
@ -36,6 +36,16 @@
|
|||
-moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
|
||||
box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
|
||||
}
|
||||
|
||||
.btn-group-vertical>.btn:first-child,
|
||||
.btn-group-vertical>.btn:last-child,
|
||||
.btn-group>.btn:first-child,
|
||||
.btn-group>.btn:last-child{
|
||||
-webkit-border-radius: 0px;
|
||||
-moz-border-radius: 0px;
|
||||
border-radius: 0px;
|
||||
}
|
||||
|
||||
.btn:hover,
|
||||
.btn:focus,
|
||||
.btn:active,
|
||||
|
|
@ -1145,6 +1155,11 @@ ul.dropdown-menu li a {
|
|||
margin: 1em auto 0;
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
#set_coordinate_origin_btn{
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
#control h1 {
|
||||
text-align: left;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -118,18 +118,22 @@
|
|||
<button class="btn box" data-bind="enable: isOperational() && !isPrinting() && loginState.isUser(), click: function() { $root.sendJogCommand('y',-1) }"><i class="icon-arrow-down"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
{% if hasZAxis %}
|
||||
<div class="jog-panel" id="control_zaxis">
|
||||
{% if hasZAxis %}
|
||||
Z-Axis
|
||||
<div class="btn-group-vertical" role="group" aria-label="z-axis control">
|
||||
<button class="btn" data-bind="enable: isOperational() && !isPrinting() && loginState.isUser(), click: function() { $root.sendJogCommand('z',1) }"><i class="icon-arrow-up"></i></button>
|
||||
<!--<button class="btn box" data-bind="enable: isOperational() && !isPrinting() && loginState.isUser(), click: function() { $root.sendHomeCommand(['z']) }"><i class="icon-home"></i></button>-->
|
||||
<button class="btn" data-bind="enable: isOperational() && !isPrinting() && loginState.isUser(), click: function() { $root.sendJogCommand('z',-1) }"><i class="icon-arrow-down"></i></button>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div>
|
||||
<button id="set_coordinate_origin_btn" class="btn" data-bind="click: setCoordinateOrigin" title="set coordinate origin"><i class="icon-screenshot"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="clearfix"></div>
|
||||
|
||||
Jog distance: <span data-bind="text: jogDistanceInMM">10</span>mm
|
||||
<div class="distance">
|
||||
<input type="text" id="jogDistance" />
|
||||
|
|
|
|||
|
|
@ -228,6 +228,10 @@ function ControlViewModel(loginStateViewModel, settingsViewModel, printerStateVi
|
|||
data: JSON.stringify(data)
|
||||
});
|
||||
};
|
||||
|
||||
self.setCoordinateOrigin = function(){
|
||||
self.sendCustomCommand({type:'command', command: "G92 X0 Y0"});
|
||||
};
|
||||
|
||||
self.sendCustomCommand = function(command) {
|
||||
if (!command)
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
<link href="{{ url_for('static', filename='css/pnotify.min.css') }}" rel="stylesheet" media="screen">
|
||||
|
||||
{% if stylesheet == "less" %}
|
||||
<link href="{{ url_for('static', filename='less/octoprint.less') }}" rel="stylesheet/less" type="text/css" media="screen">
|
||||
<!--<link href="{{ url_for('static', filename='less/octoprint.less') }}" rel="stylesheet/less" type="text/css" media="screen">-->
|
||||
|
||||
<!-- Plugin files -->
|
||||
{% for name, assets in assetPlugins.items() %}
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
<script src="{{ url_for('static', filename='js/lib/less.min.js') }}" type="text/javascript"></script>
|
||||
{% else %}
|
||||
<link href="{{ url_for('static', filename='css/octoprint.css') }}" rel="stylesheet" type="text/css" media="screen">
|
||||
<!--<link href="{{ url_for('static', filename='css/octoprint.css') }}" rel="stylesheet" type="text/css" media="screen">-->
|
||||
<!-- Plugin files -->
|
||||
{% for name, assets in assetPlugins.items() %}
|
||||
{% if "css" in assets %}
|
||||
|
|
|
|||
Loading…
Reference in a new issue