aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarijus <mario@localhost.localdomain>2013-12-01 16:52:32 +0100
committermarijus <mario@localhost.localdomain>2013-12-01 16:52:32 +0100
commit51cad9cafef228090cc1641a425ba272b1a3b470 (patch)
treea30fbd2ce23f0bc11bb4085757e652e318218d4b
parent6a1dfbb218a1e2a48010803906e78bf3b7a16965 (diff)
downloadvolse-hubzilla-51cad9cafef228090cc1641a425ba272b1a3b470.tar.gz
volse-hubzilla-51cad9cafef228090cc1641a425ba272b1a3b470.tar.bz2
volse-hubzilla-51cad9cafef228090cc1641a425ba272b1a3b470.zip
update spin.js to latest version
-rw-r--r--js/spin.js16
1 files changed, 11 insertions, 5 deletions
diff --git a/js/spin.js b/js/spin.js
index c66c607a7..af1c55f06 100644
--- a/js/spin.js
+++ b/js/spin.js
@@ -1,4 +1,4 @@
-//fgnass.github.com/spin.js#v1.3
+//fgnass.github.com/spin.js#v1.3.2
/**
* Copyright (c) 2011-2013 Felix Gnass
@@ -89,12 +89,12 @@
, pp
, i
- if(s[prop] !== undefined) return prop
prop = prop.charAt(0).toUpperCase() + prop.slice(1)
for(i=0; i<prefixes.length; i++) {
pp = prefixes[i]+prop
if(s[pp] !== undefined) return pp
}
+ if(s[prop] !== undefined) return prop
}
/**
@@ -130,6 +130,13 @@
return o
}
+ /**
+ * Returns the line color from the given string or array.
+ */
+ function getColor(color, idx) {
+ return typeof color == 'string' ? color : color[idx % color.length]
+ }
+
// Built-in defaults
var defaults = {
@@ -259,8 +266,7 @@
})
if (o.shadow) ins(seg, css(fill('#000', '0 0 4px ' + '#000'), {top: 2+'px'}))
-
- ins(el, ins(seg, fill(o.color, '0 0 1px rgba(0,0,0,.1)')))
+ ins(el, ins(seg, fill(getColor(o.color, i), '0 0 1px rgba(0,0,0,.1)')))
}
return el
},
@@ -314,7 +320,7 @@
top: -o.width>>1,
filter: filter
}),
- vml('fill', {color: o.color, opacity: o.opacity}),
+ vml('fill', {color: getColor(o.color, i), opacity: o.opacity}),
vml('stroke', {opacity: 0}) // transparent stroke to fix color bleeding upon opacity change
)
)