From 4583e7c7c5713c036b52160e4f8c7e4ae65312af Mon Sep 17 00:00:00 2001 From: Steve Orvell Date: Thu, 11 Jul 2013 18:35:23 -0700 Subject: [PATCH 01/26] repairs due to recent changes. --- arrange-game/src/arrange-game-tile.html | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/arrange-game/src/arrange-game-tile.html b/arrange-game/src/arrange-game-tile.html index c92971a..f949c54 100644 --- a/arrange-game/src/arrange-game-tile.html +++ b/arrange-game/src/arrange-game-tile.html @@ -48,6 +48,11 @@ opacity: 0; } + .tile { + width: 25%; + height: 25%; + } +
{{tile.position + 1}}
@@ -61,8 +66,10 @@ var i = {}; this.fire('request-tile-metrics', i); var m = this.metrics = i.metrics; - this.$.style.textContent += '.tile { width: ' + m.width + - '%;\n height: ' + m.height + '%;\n}'; + if (this.$.style) { + this.$.style.textContent += '.tile { width: ' + m.width + + '%;\n height: ' + m.height + '%;\n}'; + } this.binding = observePaths(this, 'tile.col tile.row', this.updatePosition.bind(this)); }, @@ -81,25 +88,26 @@ var observer = new CompoundBinding(function(values) { callback(values, calcOldValues(observer)); }); - var paths = pathsString.split(' '); + var paths = pathsString.split(' '), used = []; paths.forEach(function(path) { - observer.bind(nameForPath(observer, path), model, path); + observer.bind(nameForPath(used, path), model, path); }); return observer; } - function nameForPath(binding, path) { + function nameForPath(usedPaths, path) { var pathName = path, k=0; - while (Object.keys(binding.bindings).indexOf(pathName) >= 0) { + while (usedPaths.indexOf(pathName) >= 0) { pathName = path + ++k; } + usedPaths.push(pathName); return pathName; } function calcOldValues(binding) { var values = {}; - Object.keys(binding.bindings).forEach(function(k) { - values[k] = binding.bindings[k].oldValue; + Object.keys(binding.observers).forEach(function(k) { + values[k] = binding.observers[k].oldValue; }); return values; } From c74b4a02e29c79f09b70dcb290603ed6b6effee3 Mon Sep 17 00:00:00 2001 From: frankiefu Date: Fri, 12 Jul 2013 12:01:31 -0700 Subject: [PATCH 02/26] put code and output together into pg-view and show an example of using it as embedded --- Playground/index-embed.html | 41 +++++++++++++++ Playground/metadata.html | 33 ++++++++++++ Playground/src/css/pg-app.css | 44 +--------------- Playground/src/css/pg-output.css | 6 +++ Playground/src/css/pg-view.css | 52 +++++++++++++++++++ Playground/src/pg-app.html | 67 ++---------------------- Playground/src/pg-output.html | 1 + Playground/src/pg-view.html | 88 ++++++++++++++++++++++++++++++++ 8 files changed, 226 insertions(+), 106 deletions(-) create mode 100644 Playground/index-embed.html create mode 100644 Playground/src/css/pg-view.css create mode 100644 Playground/src/pg-view.html diff --git a/Playground/index-embed.html b/Playground/index-embed.html new file mode 100644 index 0000000..95c1147 --- /dev/null +++ b/Playground/index-embed.html @@ -0,0 +1,41 @@ + + + + + Polymer Playground Embed + + + + + + + + + + + + + + + + + + diff --git a/Playground/metadata.html b/Playground/metadata.html index 3c9128f..c2b0bec 100644 --- a/Playground/metadata.html +++ b/Playground/metadata.html @@ -410,6 +410,39 @@ + + + + - - + diff --git a/Playground/src/pg-output.html b/Playground/src/pg-output.html index 245cf51..231dfb5 100644 --- a/Playground/src/pg-output.html +++ b/Playground/src/pg-output.html @@ -5,6 +5,7 @@ * license that can be found in the LICENSE file. */ --> + diff --git a/Playground/src/css/pg-view.css b/Playground/src/css/pg-view.css index e94f0df..52c47c0 100644 --- a/Playground/src/css/pg-view.css +++ b/Playground/src/css/pg-view.css @@ -14,7 +14,16 @@ license that can be found in the LICENSE file. ajaxorg-ace#ace { position: relative !important; - width: 540px; +} + +ajaxorg-ace#ace:not([vertical]) { + width: 540px; + height: auto !important; +} + +ajaxorg-ace#ace[vertical] { + width: auto !important; + height: 200px; } pg-output { diff --git a/Playground/src/images/arrow_down.png b/Playground/src/images/arrow_down.png new file mode 100644 index 0000000000000000000000000000000000000000..309e27cbae16d4b4a3561b6e7eac2a1e61df6071 GIT binary patch literal 3009 zcmV;y3qJITP)4Tx07wm;mUmPX*B8g%%xo{TU6vwc>AklFq%OTkl_mFQv@x1^BM1TV}0C2duqR=S6Xn?LjU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brzEwv@DtyY9f?cU#3Dt& zfnhc~Z{FL@OrqjAt`uq2BFV{Jet~+%E9xnw#u~$BC7s(H^l+&2sUb^1if(#Afd^cK zByWx7@4^2D*5*p0@K>aaf066^{ve8?E>0k$$Y>kW8gh3yN0%di0N)bvZRQOwVHmDF z&pT-ZiG}=KlvrGKzKM7=$%!)sxR(^k^C7lS!;>#qY+9NCF%((rn|u>#155I`Ni5Gc z0p=;Pfyf!_G!c^TK|UkcX5R!@lN4b?#Ynyb`BXM+(VQY1&JBW~j~fL5G~ip1Pi)|i zeE=&t-E|y?zwS{^{EIj54L%O_%R^QVe&I^RmS5lrAP%c5!MzW;00000NkvXXu0mjf D!-ctE literal 0 HcmV?d00001 diff --git a/Playground/src/images/arrow_up.png b/Playground/src/images/arrow_up.png new file mode 100644 index 0000000000000000000000000000000000000000..4bce621297e189add3ca0b1dc7261d35e61de196 GIT binary patch literal 2973 zcmV;O3u5$%P)4Tx07wm;mUmPX*B8g%%xo{TU6vwc>AklFq%OTkl_mFQv@x1^BM1TV}0C2duqR=S6Xn?LjUp6xrb&~O43j*Nv zEr418u3H3zGns$s|L;SQD-ufpfWpxLJ03rmi*g~#S@{x?OrJ!Vo{}kJ7$ajbnjp%m zGEV!%=70KpVow?KvV}a4moSaFCQKV= zXBIPnpP$8-NG!rR+)R#`$7JVZi#Wn10DSspSrkx`)s~4C+0n+?(b2-z5-tDd^^cpM zz5W?wz5V3zGUCskL5!X++LzcbT23thtSPiMTfS&1I{|204}j|3FPi>70OSh+Xzlyz zdl<5LNtZ}OE>>3g`T3RtKG#xK(9i3CI(+v0d-&=+OWAp!Ysd8Ar*foO5~i%E+?=c& zshF87;&Ay)i~kOm zCIB-Z!^JGdti+UJsxgN!t(Y#%b<8kk67vyD#cE*9urAm@Y#cTXn~yERR$}Y1E!Yd# zo7hq8Ya9;8z!~A3Z~?e@Tn26#t`xT$*Ni)h>&K1Yrto;Y8r}@=h7ZGY@Dh9xekcA2 z{tSKqKZ<`tAQQ9+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COM}Rk&(&wg2ivYe;J{*Zj2BdTsgISLt?eJQu}$~QLORDCnMIdyYynPb_W zEx0YhEw{FMY&}%2SiZD;WLxOA)(U1tamB0cN!u@1+E?z~LE0hRF;o>&)xJ}I=a!xC ztJAA*)_B)6@6y<{Y1i~_-tK`to_m`1YVIxB`);3L-|hYW`&(-bYby`n4&)tpTo+T< z{VnU;hI;k-lKKw^g$IWYMIP#EaB65ctZ}%k5pI+=jvq-pa_u{x@7kLzn)Wv{noEv? zqtc^Kzfb=D*0JDYoyS?nn|?6(VOI;SrMMMpUD7()mfkkh9^c-7BIrbChiga6kCs0k zJgIZC=9KcOveTr~g{NoFEIl)IR&;jaT-v#j&ZN$J=i|=b=!)p-y%2oi(nY_E=exbS z&s=i5bn>#xz3Ke>~2=f&N;yEFGz-^boBexUH6@}b7V+Mi8+ZXR+R zIyLMw-18{v(Y+Dw$g^K^e|bMz_?Y^*a!h-y;fd{&ljDBl*PbqTI{HlXY-Xb9SH)j< zJvV;-!*8Cy^-RW1j=m7TnEk!df0BoRq!1%U5?n;>-MpY@bTDg}V=KpZ13xRsG)fOf5L zzHNhez&BW(Mr}XNl5_s1`|if1M!hAQdM-G;+dV4B#Qelg7AX%S45f6MbURE zAM4K; - + From 28a7b81e8e1da9814278c32ebdcefbcafa4bee9b Mon Sep 17 00:00:00 2001 From: frankiefu Date: Tue, 16 Jul 2013 11:17:53 -0700 Subject: [PATCH 07/26] playground: add imports section to sidebar --- Playground/elements.html | 2 + Playground/index.html | 6 +- Playground/metadata.html | 9 +++ Playground/more-elements-metadata.html | 4 ++ Playground/polymer-elements-metadata.html | 5 ++ Playground/polymer-ui-elements-metadata.html | 7 ++ Playground/src/css/pg-app.css | 23 ++++++- Playground/src/css/pg-view.css | 2 +- Playground/src/pg-app.html | 68 ++++++++++++++++---- Playground/src/pg-element-meta.html | 23 +++++++ Playground/src/pg-view.html | 1 + 11 files changed, 134 insertions(+), 16 deletions(-) create mode 100644 Playground/more-elements-metadata.html create mode 100644 Playground/polymer-elements-metadata.html create mode 100644 Playground/polymer-ui-elements-metadata.html create mode 100644 Playground/src/pg-element-meta.html diff --git a/Playground/elements.html b/Playground/elements.html index 4c803ad..8cb0dc5 100644 --- a/Playground/elements.html +++ b/Playground/elements.html @@ -18,6 +18,8 @@ + + diff --git a/Playground/index.html b/Playground/index.html index a51b2b5..9e74279 100644 --- a/Playground/index.html +++ b/Playground/index.html @@ -14,8 +14,12 @@ - + + + + + diff --git a/Playground/metadata.html b/Playground/metadata.html index f593104..65401c1 100644 --- a/Playground/metadata.html +++ b/Playground/metadata.html @@ -374,6 +374,9 @@ @@ -382,6 +385,9 @@ + + - - diff --git a/Playground/src/pg-view-gridlayout.html b/Playground/src/pg-view-gridlayout.html index abe4c7c..d98d8d1 100644 --- a/Playground/src/pg-view-gridlayout.html +++ b/Playground/src/pg-view-gridlayout.html @@ -72,15 +72,16 @@ this.meta = meta; } }, + resize: function() { + this.$.ace.editor.resize(); + }, toggleMaximized: function() { this.maximized = !this.maximized; }, verticalChanged: function() { this.layout = this.arrangements[this.vertical ? 1 : 0]; this.maximizedChanged(); - this.asyncMethod(function() { - this.$.ace.editor.resize(); - }); + this.asyncMethod(this.resize); }, queryMatchesChanged: function() { if (this.responsive) { @@ -109,7 +110,7 @@ }, splitterDragEnd: function() { this.enableOutpuMouseEvents(); - this.$.ace.editor.resize(); + this.resize(); }, disableOutputMouseEvents: function() { this.$.output.classList.add('pointer-none'); @@ -129,13 +130,13 @@ // remove emtpy string value e.g. vertical="" s = s.replace(/=\"\"/g, ''); this.$.ace.value = s; - this.asyncMethod('run'); - }, - run: function() { - this.source = this.$.ace.editorValue; this.asyncMethod(function() { + this.run(); this.$.ace.gotoLine(1); }); + }, + run: function() { + this.source = this.$.ace.editorValue; } }); diff --git a/Playground/src/pg-view.html b/Playground/src/pg-view.html index 160de79..ca0ad2f 100644 --- a/Playground/src/pg-view.html +++ b/Playground/src/pg-view.html @@ -61,14 +61,15 @@ this.meta = meta; } }, + resize: function() { + this.$.ace.editor.resize(); + }, toggleMaximized: function() { this.maximized = !this.maximized; }, verticalChanged: function() { this.maximizedChanged(); - this.asyncMethod(function() { - this.$.ace.editor.resize(); - }); + this.asyncMethod(this.resize); }, queryMatchesChanged: function() { if (this.responsive) { @@ -89,7 +90,7 @@ }, splitterDragEnd: function() { this.enableOutpuMouseEvents(); - this.$.ace.editor.resize(); + this.resize(); }, disableOutputMouseEvents: function() { this.$.output.classList.add('pointer-none'); @@ -109,13 +110,13 @@ // remove emtpy string value e.g. vertical="" s = s.replace(/=\"\"/g, ''); this.$.ace.value = s; - this.asyncMethod('run'); - }, - run: function() { - this.source = this.$.ace.editorValue; this.asyncMethod(function() { + this.run(); this.$.ace.gotoLine(1); }); + }, + run: function() { + this.source = this.$.ace.editorValue; } }); From b5c67aaa6d54d22def1ee823af1155e2998456dc Mon Sep 17 00:00:00 2001 From: frankiefu Date: Thu, 18 Jul 2013 20:04:23 -0700 Subject: [PATCH 13/26] add noscript --- Sandbox/lib/tk-element.html | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Sandbox/lib/tk-element.html b/Sandbox/lib/tk-element.html index 88c829b..87360f5 100755 --- a/Sandbox/lib/tk-element.html +++ b/Sandbox/lib/tk-element.html @@ -167,8 +167,5 @@ - - + \ No newline at end of file From a63795c9e4ed1a49faae31a4b4f19ff7ef0104e2 Mon Sep 17 00:00:00 2001 From: frankiefu Date: Fri, 19 Jul 2013 10:42:00 -0700 Subject: [PATCH 14/26] adjust for folder and filename changes in more-elements --- AceEditor/index.html | 6 +-- Gallery/elements/ga-meta.html | 5 +-- .../{x-coolclock.png => cool-clock.png} | Bin .../images/{x-stock.png => polymer-stock.png} | Bin Gallery/metadata.html | 40 +++++++++--------- Playground/more-elements-metadata.html | 4 +- Playground/src/css/pg-view.css | 6 +-- Playground/src/pg-view-gridlayout.html | 4 +- Playground/src/pg-view.html | 4 +- Sandbox/lib/components.html | 24 +++++------ Sandbox/lib/tk-source.html | 4 +- Sandbox/metadata.html | 10 ++--- pica/components/css/pi-home.css | 2 +- pica/components/pi-explore.html | 2 +- pica/components/pi-home.html | 10 ++--- youtube/src/yt-app.html | 4 +- youtube/src/yt-videopanel.html | 2 +- 17 files changed, 62 insertions(+), 65 deletions(-) rename Gallery/images/{x-coolclock.png => cool-clock.png} (100%) rename Gallery/images/{x-stock.png => polymer-stock.png} (100%) diff --git a/AceEditor/index.html b/AceEditor/index.html index ca460ed..f1140ef 100644 --- a/AceEditor/index.html +++ b/AceEditor/index.html @@ -15,7 +15,7 @@ - + function foo(items) { @@ -28,7 +28,7 @@