Skip to content
This repository has been archived by the owner on Dec 19, 2024. It is now read-only.

Commit

Permalink
restore noink
Browse files Browse the repository at this point in the history
  • Loading branch information
valdrinkoshi committed Nov 9, 2016
1 parent 63ba0a0 commit 4786f2a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@

<div class="button raised">
<div class="center" tabindex="1">NO INK</div>
<paper-ripple no-ink></paper-ripple>
<paper-ripple noink></paper-ripple>
</div>

<div class="button raised grey">
Expand Down
18 changes: 9 additions & 9 deletions paper-ripple.html
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@
* Calling ripple's imperative api like `simulatedRipple` will
* still generate the ripple effect.
*/
noInk: {
noink: {
type: Boolean,
value: false
},
Expand Down Expand Up @@ -565,7 +565,7 @@
attached: function() {
// Set up a11yKeysBehavior to listen to key events on the target,
// so that space and enter activate the ripple even if the target doesn't
// handle key events. The key handlers deal with `noInk` themselves.
// handle key events. The key handlers deal with `noink` themselves.
if (this.parentNode.nodeType == 11) { // DOCUMENT_FRAGMENT_NODE
this.keyEventTarget = Polymer.dom(this).getOwnerRoot().host;
} else {
Expand Down Expand Up @@ -603,18 +603,18 @@

/**
* Provokes a ripple down effect via a UI event,
* respecting the `noInk` property.
* respecting the `noink` property.
* @param {Event=} event
*/
uiDownAction: function(event) {
if (!this.noInk) {
if (!this.noink) {
this.downAction(event);
}
},

/**
* Provokes a ripple down effect via a UI event,
* *not* respecting the `noInk` property.
* *not* respecting the `noink` property.
* @param {Event=} event
*/
downAction: function(event) {
Expand All @@ -634,18 +634,18 @@

/**
* Provokes a ripple up effect via a UI event,
* respecting the `noInk` property.
* respecting the `noink` property.
* @param {Event=} event
*/
uiUpAction: function(event) {
if (!this.noInk) {
if (!this.noink) {
this.upAction(event);
}
},

/**
* Provokes a ripple up effect via a UI event,
* *not* respecting the `noInk` property.
* *not* respecting the `noink` property.
* @param {Event=} event
*/
upAction: function(event) {
Expand Down Expand Up @@ -739,7 +739,7 @@
this.uiUpAction();
},

// note: holdDown does not respect noInk since it can be a focus based
// note: holdDown does not respect noink since it can be a focus based
// effect.
_holdDownChanged: function(newVal, oldVal) {
if (oldVal === undefined) {
Expand Down
12 changes: 6 additions & 6 deletions test/paper-ripple.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@
</template>
</test-fixture>

<test-fixture id="NoInkTarget">
<test-fixture id="NoinkTarget">
<template>
<div id="RippleContainer">
<paper-ripple no-ink></paper-ripple>
<paper-ripple noink></paper-ripple>
</div>
</template>
</test-fixture>
Expand Down Expand Up @@ -109,18 +109,18 @@
expect(ripple.ripples.length).to.be.eql(1);
});

test('generates a ripple when noInk', function() {
ripple.noInk = true;
test('generates a ripple when noink', function() {
ripple.noink = true;
ripple.holdDown = true;
expect(ripple.ripples.length).to.be.eql(1);

});

});

suite('when target is noInk', function () {
suite('when target is noink', function () {
setup(function () {
rippleContainer = fixture('NoInkTarget');
rippleContainer = fixture('NoinkTarget');
ripple = rippleContainer.firstElementChild;
});

Expand Down

0 comments on commit 4786f2a

Please sign in to comment.