Coffeescript for absolute controls

This commit is contained in:
David Vandorpe 2016-08-30 18:28:14 +02:00
parent 58a85c72b0
commit 25faaaf01a
2 changed files with 12 additions and 12 deletions

View file

@ -27,6 +27,6 @@ $ '.ctrl'
$context = $ this $context = $ this
$.ajax "//kelder.zeus.ugent.be/webcam/cgi/ptdc.cgi", $.ajax "//kelder.zeus.ugent.be/webcam/cgi/ptdc.cgi",
data: data:
command: 'set_relative_pos' command: $context.data 'command'
posX: $context.data 'x' posX: $context.data 'x'
posY: $context.data 'y' posY: $context.data 'y'

View file

@ -31,48 +31,48 @@ title: Cammie
<img id="cammie-feed" src="https://kelder.zeus.ugent.be/webcam/video/mjpg.cgi?profileid=2"> <img id="cammie-feed" src="https://kelder.zeus.ugent.be/webcam/video/mjpg.cgi?profileid=2">
<div id="cammie-ctrls"> <div id="cammie-ctrls">
<div class="top-row row"> <div class="top-row row">
<div class="column ctrl diag left" data-x="-10" data-y="10"> <div class="column ctrl diag left" data-command="set_relative_pos" data-x="-10" data-y="10">
<%= fa 'chevron-circle-left' %> <%= fa 'chevron-circle-left' %>
</div> </div>
<div class="column ctrl center" data-x="0" data-y="10"> <div class="column ctrl center" data-command="set_relative_pos" data-x="0" data-y="10">
<%= fa 'chevron-circle-up' %> <%= fa 'chevron-circle-up' %>
</div> </div>
<div class="column ctrl diag right" data-x="10" data-y="10"> <div class="column ctrl diag right" data-command="set_relative_pos" data-x="10" data-y="10">
<%= fa 'chevron-circle-up' %> <%= fa 'chevron-circle-up' %>
</div> </div>
</div> </div>
<div class="row middle-row"> <div class="row middle-row">
<div class="column ctrl left" data-x="-10" data-y="0"> <div class="column ctrl left" data-command="set_relative_pos" data-x="-10" data-y="0">
<%= fa 'chevron-circle-left' %> <%= fa 'chevron-circle-left' %>
</div> </div>
<div class="column center"> <div class="column center">
<div class="ctrl-half"> <div class="ctrl-half">
<div class="ctrl"> <div class="ctrl" data-command="set_pos" data-x="0" data-y="12">
Kleine tafel Kleine tafel
</div> </div>
<div class="ctrl"> <div class="ctrl" data-command="set_pos" data-x="50" data-y="10">
Grote tafel Grote tafel
</div> </div>
</div> </div>
<div class="ctrl-half"> <div class="ctrl-half">
<div class="ctrl"> <div class="ctrl" data-command="set_pos" data-x="50" data-y="22">
Zetel Zetel
</div> </div>
</div> </div>
</div> </div>
<div class="column ctrl right" data-x="10" data-y="0"> <div class="column ctrl right" data-command="set_relative_pos" data-x="10" data-y="0">
<%= fa 'chevron-circle-right' %> <%= fa 'chevron-circle-right' %>
</div> </div>
</div> </div>
<div class="row bottom-row"> <div class="row bottom-row">
<div class="column ctrl diag left" data-x="-10" data-y="-10"> <div class="column ctrl diag left" data-command="set_relative_pos" data-x="-10" data-y="-10">
<%= fa 'chevron-circle-down' %> <%= fa 'chevron-circle-down' %>
</div> </div>
<div class="column ctrl center" data-x="0" data-y="-10"> <div class="column ctrl center" data-command="set_relative_pos" data-x="0" data-y="-10">
<%= fa 'chevron-circle-down' %> <%= fa 'chevron-circle-down' %>
</div> </div>
<div class="column ctrl diag right" data-x="10" data-y="-10"> <div class="column ctrl diag right" data-command="set_relative_pos" data-x="10" data-y="-10">
<%= fa 'chevron-circle-right' %> <%= fa 'chevron-circle-right' %>
</div> </div>
</div> </div>