summaryrefslogtreecommitdiffstats
path: root/src/main/java/xml/formControls.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/xml/formControls.js')
-rw-r--r--src/main/java/xml/formControls.js27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/main/java/xml/formControls.js b/src/main/java/xml/formControls.js
new file mode 100644
index 0000000..7c951c2
--- /dev/null
+++ b/src/main/java/xml/formControls.js
@@ -0,0 +1,27 @@
+
+/**
+ * Layout a form control. Must be called to initialize and whenever the
+ * form's dimensions change.
+ */
+function pack()
+{
+}
+
+function moveLabel(name, x, y, width, height)
+{
+ var clipRect = svgDocument.getElementById(name + "-clip-rect");
+ clipRect.setAttribute("x", x);
+ clipRect.setAttribute("y", y);
+ clipRect.setAttribute("width", width);
+ clipRect.setAttribute("height", height);
+
+ var rect = svgDocument.getElementById(name + "-rect");
+ rect.setAttribute("x", x);
+ rect.setAttribute("y", y);
+ rect.setAttribute("width", width);
+ rect.setAttribute("height", height);
+
+ var text = svgDocument.getElementById(name + "-text");
+ rect.setAttribute("x", x);
+ rect.setAttribute("y", y);
+} \ No newline at end of file