summaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2015-01-11 16:43:29 +0200
committerLeif Åstrand <leif@vaadin.com>2015-01-11 15:56:21 +0000
commitb499c36b663ab259701ebdc4abd3b799955f223a (patch)
tree9e4d77ba916e044751681a318f53569c357088ef /widgets
parent4e732adf67c607834172f6bd028a90dab7a2f97f (diff)
downloadvaadin-framework-b499c36b663ab259701ebdc4abd3b799955f223a.tar.gz
vaadin-framework-b499c36b663ab259701ebdc4abd3b799955f223a.zip
Add widgets-module to Eclipse (#15544)
Change-Id: Ida08d51d26c97a8c1e92fc6cd49c8885e91cd052
Diffstat (limited to 'widgets')
-rw-r--r--widgets/ivy.xml7
1 files changed, 2 insertions, 5 deletions
diff --git a/widgets/ivy.xml b/widgets/ivy.xml
index 3a304eeec6..d7c29631f4 100644
--- a/widgets/ivy.xml
+++ b/widgets/ivy.xml
@@ -19,7 +19,7 @@
<artifact type="javadoc" ext="jar" m:classifier="javadoc" />
<artifact type="pom" ext="pom" />
</publications>
- <dependencies defaultconf="build" defaultconfmapping="build,ide->default">
+ <dependencies defaultconf="build" defaultconfmapping="build->default">
<!-- API DEPENDENCIES -->
<!-- LIBRARY DEPENDENCIES (compile time) -->
@@ -41,10 +41,7 @@
<exclude type="pom" conf="test" />
</dependency>
<dependency org="com.vaadin" name="vaadin-sass-compiler"
- rev="${vaadin.sass.version}"
- conf="build-provided->default" />
- <dependency org="junit" name="junit" rev="4.11"
- conf="test->default" />
+ rev="${vaadin.sass.version}" conf="build-provided->default" />
</dependencies>
// Add transformations transform: function(o, relative) { // get target in case of the fx module, otherwise reference this var target = this.target || this , matrix // act as a getter if (typeof o !== 'object') { // get current matrix matrix = new SVG.Matrix(target).extract() // add parametric rotation if (typeof this.param === 'object') { matrix.rotation = this.param.rotation matrix.cx = this.param.cx matrix.cy = this.param.cy } return typeof o === 'string' ? matrix[o] : matrix } // get current matrix matrix = this instanceof SVG.FX && this.attrs.transform ? this.attrs.transform : new SVG.Matrix(target) // ensure relative flag relative = !!relative || !!o.relative // act on matrix if (o.a != null) { matrix = relative ? // relative matrix.multiply(new SVG.Matrix(o)) : // absolute new SVG.Matrix(o) // act on rotation } else if (o.rotation != null) { // ensure centre point ensureCentre(o, target) // relativize rotation value if (relative) { o.rotation += this.param && this.param.rotation != null ? this.param.rotation : matrix.extract().rotation } // store parametric values this.param = o // apply transformation if (this instanceof SVG.Element) { matrix = relative ? // relative matrix.rotate(o.rotation, o.cx, o.cy) : // absolute matrix.rotate(o.rotation - matrix.extract().rotation, o.cx, o.cy) } // act on scale } else if (o.scale != null || o.scaleX != null || o.scaleY != null) { // ensure centre point ensureCentre(o, target) // ensure scale values on both axes o.scaleX = o.scale != null ? o.scale : o.scaleX != null ? o.scaleX : 1 o.scaleY = o.scale != null ? o.scale : o.scaleY != null ? o.scaleY : 1 if (!relative) { // absolute; multiply inversed values var e = matrix.extract() o.scaleX = o.scaleX * 1 / e.scaleX o.scaleY = o.scaleY * 1 / e.scaleY } matrix = matrix.scale(o.scaleX, o.scaleY, o.cx, o.cy) // act on skew } else if (o.skewX != null || o.skewY != null) { // ensure centre point ensureCentre(o, target) // ensure skew values on both axes o.skewX = o.skewX != null ? o.skewX : 0 o.skewY = o.skewY != null ? o.skewY : 0 if (!relative) { // absolute; reset skew values var e = matrix.extract() matrix = matrix.multiply(new SVG.Matrix().skew(e.skewX, e.skewY, o.cx, o.cy).inverse()) } matrix = matrix.skew(o.skewX, o.skewY, o.cx, o.cy) // act on flip } else if (o.flip) { matrix = matrix.flip( o.flip , o.offset == null ? target.bbox()['c' + o.flip] : o.offset ) // act on translate } else if (o.x != null || o.y != null) { if (relative) { // relative matrix = matrix.translate(o.x, o.y) } else { // absolute if (o.x != null) matrix.e = o.x if (o.y != null) matrix.f = o.y } } return this.attr('transform', matrix) } }) SVG.extend(SVG.Element, { // Reset all transformations untransform: function() { return this.attr('transform', null) }, matrixify: function() { var matrix = (this.attr('transform') || '') // split transformations .split(/\)\s*/).slice(0,-1).map(function(str){ // generate key => value pairs var kv = str.trim().split('(') return [kv[0], kv[1].split(SVG.regex.matrixElements).map(function(str){ return parseFloat(str) })] }) // calculate every transformation into one matrix .reduce(function(matrix, transform){ if(transform[0] == 'matrix') return matrix.multiply(arrayToMatrix(transform[1])) return matrix[transform[0]].apply(matrix, transform[1]) }, new SVG.Matrix()) // apply calculated matrix to element this.attr('transform', matrix) return matrix } })