Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Better builder for common resources

  • Loading branch information...
commit a883e59d34e8d62e0610af1f030ea2fd2f8de86b 1 parent b097833
@sergeche authored
Showing with 12 additions and 22 deletions.
  1. +6 −20 build/build.xml
  2. +5 −2 src/dnd_feedback.js
  3. +1 −0  xml-pretty-print.xslt
View
26 build/build.xml
@@ -10,7 +10,7 @@
<mkdir dir="${dist.js.dir}"/>
</target>
- <filelist dir="${js-src.dir}" id="js.source">
+ <filelist dir="${js-src.dir}" id="js.common">
<file name="lib/underscore.js"/>
<file name="lib/js-signals.js"/>
<file name="signals.js"/>
@@ -20,9 +20,7 @@
<file name="renderer.js"/>
<file name="search.js"/>
<file name="search_ui.js"/>
- <file name="controller.js"/>
<file name="dnd.js"/>
- <file name="dnd_feedback.js"/>
<file name="outline.js"/>
<file name="outline_ui.js"/>
<file name="controller.js"/>
@@ -31,7 +29,10 @@
<target name="compile.js" depends="init">
<compress-js-lib tofile="${dist.js.dir}/xv.js" force="${force-rebuild}" use-cc="${webtasks.use-cc}">
- <filelist refid="js.source"/>
+ <filelist refid="js.common"/>
+ <filelist dir="${js-src.dir}">
+ <file name="dnd_feedback.js"/>
+ </filelist>
</compress-js-lib>
<concat destfile="${dist.js.dir}/xv-src.js">
@@ -51,22 +52,7 @@
</copy>
<copy file="${dist.css-full.dir}/main.css" tofile="${dist.chrome.dir}/xv.css"/>
<concat destfile="${dist.chrome.dir}/xv.js">
- <filelist dir="${js-src.dir}">
- <file name="lib/underscore.js"/>
- <file name="lib/js-signals.js"/>
- <file name="signals.js"/>
- <file name="utils.js"/>
- <file name="dom.js"/>
- <file name="settings.js"/>
- <file name="renderer.js"/>
- <file name="search.js"/>
- <file name="search_ui.js"/>
- <file name="dnd.js"/>
- <file name="outline.js"/>
- <file name="outline_ui.js"/>
- <file name="controller.js"/>
- <file name="selection-notifier.js"/>
- </filelist>
+ <filelist refid="js.common"/>
</concat>
<copy file="${js-src.dir}/dnd_feedback.js" todir="${dist.chrome.dir}"/>
</target>
View
7 src/dnd_feedback.js
@@ -4,6 +4,9 @@
*
* @author Sergey Chikuyonok (serge.che@gmail.com)
* @link http://chikuyonok.ru
+ *
+ * @include "signals.js"
+ * @include "dom.js"
*/
var xv_dnd_feedback = (function(){
var canvas = document.createElement('canvas'),
@@ -14,13 +17,13 @@ var xv_dnd_feedback = (function(){
padding_left = 6,
padding_top = 4,
bg_pattern;
-
+
var bg = new Image;
bg.onload = function() {
bg_pattern = ctx.createPattern(bg, 'repeat');
};
bg.src = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAbCAIAAAA70dJZAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAHdJREFUeNp0j1EOwCAIQ8Fw/3t6CGW4sg7N1kQ/6qNU7b3POd1dRFpIHqlquOZFYb3vQFqcDz4i9dbiMQnKOAwwebqGMv99mJQIy+M2LBtjgFrzW6TsMpRlRMMmrmg1/ORX3tHHKp957J//r18++2/9cj8V1iXAAFG7oYASmw8VAAAAAElFTkSuQmCC';
-
+
function roundedRect(ctx, x, y, width, height, radius) {
ctx.beginPath();
ctx.moveTo(x + radius, y);
View
1  xml-pretty-print.xslt
@@ -29,6 +29,7 @@
<body>
<div class="xv-search-panel">
<input type="search" class="xv-search-field" spellcheck="false" placeholder="Search by name or XPath" />
+ <span class="xv-search-xpath-result"></span>
</div>
<div class="xv-source-pane">
<div class="xv-source-pane-inner"></div>
Please sign in to comment.
Something went wrong with that request. Please try again.