From d2edb294b7fe6db96367e956b4ceeb5a6f63ec61 Mon Sep 17 00:00:00 2001
From: Dan Beam
Date: Tue, 16 Feb 2016 17:08:32 -0800
Subject: [PATCH 1/9] Make paper-drawer-panel#rightDrawer default to true in
RTL
---
paper-drawer-panel.html | 8 +++++++-
test/index.html | 2 ++
test/rtl.html | 40 ++++++++++++++++++++++++++++++++++++++++
3 files changed, 49 insertions(+), 1 deletion(-)
create mode 100644 test/rtl.html
diff --git a/paper-drawer-panel.html b/paper-drawer-panel.html
index 8dc8b1e..730d130 100644
--- a/paper-drawer-panel.html
+++ b/paper-drawer-panel.html
@@ -469,7 +469,9 @@
*/
rightDrawer: {
type: Boolean,
- value: false
+ value: function() {
+ return this._isRTL();
+ },
},
/**
@@ -550,6 +552,10 @@
this._transition = true;
},
+ _isRTL: function() {
+ return window.getComputedStyle(this).direction == 'rtl';
+ },
+
_onMainTransitionEnd: function (e) {
if (e.currentTarget === this.$.main && (e.propertyName === 'left' || e.propertyName === 'right')) {
this.notifyResize();
diff --git a/test/index.html b/test/index.html
index 1509baa..09c150c 100644
--- a/test/index.html
+++ b/test/index.html
@@ -19,8 +19,10 @@
diff --git a/test/rtl.html b/test/rtl.html
new file mode 100644
index 0000000..07aa122
--- /dev/null
+++ b/test/rtl.html
@@ -0,0 +1,40 @@
+
+
+
+
+
+ paper-drawer-panel tests
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
From 287c331554d3b58bcd4152807c8dfb27f159425c Mon Sep 17 00:00:00 2001
From: Dan Beam
Date: Tue, 16 Feb 2016 17:18:37 -0800
Subject: [PATCH 2/9] doh
---
test/rtl.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test/rtl.html b/test/rtl.html
index 07aa122..7a85f37 100644
--- a/test/rtl.html
+++ b/test/rtl.html
@@ -31,7 +31,7 @@
suite('rtl', function() {
test('rightDrawer is true by default in RTL', function(done) {
- expect(fixture('rtl-drawer').$$('paper-drawer-panel')).to.be.true;
+ expect(fixture('rtl-drawer').$$('paper-drawer-panel').rightDrawer).to.be.true;
});
});
From 8383ddecec7eff0dae2cc278aab7827264792778 Mon Sep 17 00:00:00 2001
From: Dan Beam
Date: Tue, 16 Feb 2016 17:37:25 -0800
Subject: [PATCH 3/9] fix tests?
---
test/rtl.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test/rtl.html b/test/rtl.html
index 7a85f37..e80be96 100644
--- a/test/rtl.html
+++ b/test/rtl.html
@@ -31,7 +31,7 @@
suite('rtl', function() {
test('rightDrawer is true by default in RTL', function(done) {
- expect(fixture('rtl-drawer').$$('paper-drawer-panel').rightDrawer).to.be.true;
+ expect(fixture('rtl-drawer').rightDrawer).to.be.true;
});
});
From 2af0381895749f6270fe359d23b436095437e0e2 Mon Sep 17 00:00:00 2001
From: Dan Beam
Date: Tue, 16 Feb 2016 20:42:32 -0800
Subject: [PATCH 4/9] move to test/positioning.html and scope
---
test/index.html | 2 --
test/positioning.html | 24 ++++++++++++++++++++----
test/rtl.html | 40 ----------------------------------------
3 files changed, 20 insertions(+), 46 deletions(-)
delete mode 100644 test/rtl.html
diff --git a/test/index.html b/test/index.html
index 09c150c..1509baa 100644
--- a/test/index.html
+++ b/test/index.html
@@ -19,10 +19,8 @@
diff --git a/test/positioning.html b/test/positioning.html
index f70c2cf..0cfedc9 100644
--- a/test/positioning.html
+++ b/test/positioning.html
@@ -28,10 +28,10 @@
-
-
-
-
+
+
+
+
@@ -44,6 +44,15 @@
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/test/rtl.html b/test/rtl.html
deleted file mode 100644
index e80be96..0000000
--- a/test/rtl.html
+++ /dev/null
@@ -1,40 +0,0 @@
-
-
-
-