Skip to content

Commit

Permalink
Minor fix/improvement with Attributes Plugin regarding current attrib…
Browse files Browse the repository at this point in the history
…ute value suffix.
  • Loading branch information
thednp committed Sep 20, 2016
1 parent b83bb95 commit cc332f0
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 8 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ For documentation, examples and other cool tips, check the <a href="http://thedn
# Attributes Plugin - [visit page](http://thednp.github.io/kute.js/attr.html)
* animates any numeric presentation attribute with suffixed value
* animates any other non-suffixed numeric presentation attribute
* handles attributes namespaces properly with `stroke-opacity` or `strokeOpacity`
* properly handles the suffixes for you

# Easing Functions - [visit page](http://thednp.github.io/kute.js/easing.html)
* optimized dynamics easing functions
Expand All @@ -49,9 +51,9 @@ The plugin is just a few bits of code to bridge all of the the awesome `kute.js`
# NPM/Bower
You can install this through NPM or bower respectively:
```
$ npm install kute.js
# or
$ bower install kute.js
$ npm install kute.js
# or
$ bower install kute.js
```

# CommonJS/AMD support
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "KUTE.js",
"version": "1.5.5",
"version": "1.5.6",
"homepage": "http://thednp.github.io/kute.js",
"authors": [
"thednp"
Expand Down
2 changes: 1 addition & 1 deletion demo/src/kute-attr.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
var ats = {}, p;
for ( p in o ) {
var prop = replaceUppercase(p), cv = getCurrentValue(l,prop.replace(/_+[a-z]+/,''));
if ( /%|[a-z]/.test(o[p]) || /%|[a-z]/.test(cv) ) {
if ( /(%|[a-z]+)$/.test(o[p]) || /(%|[a-z]+)$/.test(cv) ) {
var u = K.truD(cv).u || K.truD(o[p]).u, s = /%/.test(u) ? '_percent' : '_'+u;
if (!(p+s in atts)) {
atts[p+s] = function(l,p,a,b,v) {
Expand Down
2 changes: 1 addition & 1 deletion dist/kute-attr.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion kute-attr.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
var ats = {}, p;
for ( p in o ) {
var prop = replaceUppercase(p), cv = getCurrentValue(l,prop.replace(/_+[a-z]+/,''));
if ( /%|[a-z]/.test(o[p]) || /%|[a-z]/.test(cv) ) {
if ( /(%|[a-z]+)$/.test(o[p]) || /(%|[a-z]+)$/.test(cv) ) {
var u = K.truD(cv).u || K.truD(o[p]).u, s = /%/.test(u) ? '_percent' : '_'+u;
if (!(p+s in atts)) {
atts[p+s] = function(l,p,a,b,v) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "kute.js",
"version": "1.5.5",
"version": "1.5.6",
"description": "A minimal Native Javascript animation engine.",
"main": "kute.js",
"scripts": {
Expand Down

0 comments on commit cc332f0

Please sign in to comment.