Adde remote debug option to ant and also added titles to map icons
This commit is contained in:
parent
19bd06e28b
commit
f3482be14d
3 changed files with 51 additions and 9 deletions
12
build.xml
12
build.xml
|
|
@ -40,7 +40,17 @@
|
|||
<target name="run" depends="release">
|
||||
<java fork="true" failonerror="true" classname="se.hal.HalServer">
|
||||
<classpath>
|
||||
<pathelement path="${releaseDir}/hal.jar"/> <!--wildcard may not be platform independent, ok?-->
|
||||
<pathelement path="${releaseDir}/hal.jar"/>
|
||||
<pathelement path="${libDir}/*"/> <!--wildcard may not be platform independent, ok?-->
|
||||
</classpath>
|
||||
</java>
|
||||
</target>
|
||||
|
||||
<target name="remote-debug" depends="release">
|
||||
<java fork="true" failonerror="true" classname="se.hal.HalServer">
|
||||
<jvmarg value="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005" />
|
||||
<classpath>
|
||||
<pathelement path="${releaseDir}/hal.jar"/>
|
||||
<pathelement path="${libDir}/*"/> <!--wildcard may not be platform independent, ok?-->
|
||||
</classpath>
|
||||
</java>
|
||||
|
|
|
|||
26
resource/web/js/svg.title.js
Executable file
26
resource/web/js/svg.title.js
Executable file
|
|
@ -0,0 +1,26 @@
|
|||
// Title Plugin
|
||||
// Source: https://github.com/wout/svg.js/issues/147
|
||||
//
|
||||
// // example usage
|
||||
// var draw = SVG('drawing')
|
||||
// var group = draw.group()
|
||||
// group.title('This is a pink square.')
|
||||
// group.rect(100,100).fill('#f06')
|
||||
|
||||
SVG.Title = SVG.invent({
|
||||
create: 'title',
|
||||
inherit: SVG.Element,
|
||||
extend: {
|
||||
text: function(text) {
|
||||
while (this.node.firstChild)
|
||||
this.node.removeChild(this.node.firstChild)
|
||||
this.node.appendChild(document.createTextNode(text))
|
||||
return this
|
||||
}
|
||||
},
|
||||
construct: {
|
||||
title: function(text) {
|
||||
return this.put(new SVG.Title).text(text)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
@ -43,6 +43,7 @@
|
|||
|
||||
|
||||
<script src="js/svg.min.js"></script>
|
||||
<script src="js/svg.title.js"></script>
|
||||
<script src="js/svg.draggable.min.js"></script>
|
||||
<script src="js/jquery.filer.min.js"></script>
|
||||
<link href="css/jquery.filer.css" rel="stylesheet">
|
||||
|
|
@ -139,17 +140,22 @@
|
|||
|
||||
// Sensors
|
||||
$.each(json.sensors, function(i, sensor) {
|
||||
var device = svg.image("/img/temperature.png").addClass("draggable").addClass("sensor");
|
||||
device.x(sensor.x);
|
||||
device.y(sensor.y);
|
||||
device.attr("device-id", sensor.id);
|
||||
var group = svg.group();
|
||||
group.image("/img/temperature.png")
|
||||
.addClass("draggable").addClass("sensor")
|
||||
.x(sensor.x).y(sensor.y)
|
||||
.attr("device-id", sensor.id)
|
||||
group.title(sensor.name);
|
||||
});
|
||||
// Events
|
||||
$.each(json.events, function(i, event) {
|
||||
var device = svg.image("/img/lightbulb.svg").addClass("draggable").addClass("event");
|
||||
device.x(event.x);
|
||||
device.y(event.y);
|
||||
device.attr("device-id", event.id);
|
||||
var group = svg.group();
|
||||
svg.image("/img/lightbulb.svg")
|
||||
.addClass("draggable").addClass("event")
|
||||
device.x(event.x)
|
||||
device.y(event.y)
|
||||
device.attr("device-id", event.id)
|
||||
device.title(event.name);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue