Skip to content
This repository was archived by the owner on Jan 4, 2021. It is now read-only.

Commit 40b37e0

Browse files
committed
[DEV] Refactor after Polymer 3 migration
1 parent 156dc3d commit 40b37e0

File tree

3 files changed

+21
-19
lines changed

3 files changed

+21
-19
lines changed

examples/non-version-specific/customize_style.html

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,12 @@
6464
</style>
6565

6666
<script src="../../node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script>
67+
<script src="../../node_modules/web-animations-js/web-animations-next-lite.min.js"></script>
6768
<script type="module" src="../../node_modules/@polymer/paper-toggle-button/paper-toggle-button.js"></script>
6869
<script type="module" src="../../node_modules/@polymer/paper-swatch-picker/paper-swatch-picker.js"></script>
6970
<script type="module" src="../../node_modules/@polymer/paper-slider/paper-slider.js"></script>
70-
<script src="../../node_modules/web-animations-js/web-animations-next-lite.min.js"></script>
7171
<script type="module" src="../../myscript-math-web.js"></script>
72+
7273
<custom-style>
7374
<style>
7475
myscript-math-web {
@@ -97,20 +98,20 @@
9798
<paper-toggle-button class="flex-item" id="penstyleclasses" checked>Apply pen style classes (greenThickPen)
9899
</paper-toggle-button>
99100
<span class="flex-item">
100-
<paper-toggle-button id="penenabled">Enable pen color/width</paper-toggle-button>
101-
<span id="pensettings" class="hidden">
102-
<paper-swatch-picker id="pencolor"></paper-swatch-picker>
103-
<paper-slider id="penwidth" snaps min="1" max="5" value="2"></paper-slider>
104-
</span>
105-
</span>
101+
<paper-toggle-button id="penenabled">Enable pen color/width</paper-toggle-button>
102+
<span id="pensettings" class="hidden">
103+
<paper-swatch-picker id="pencolor"></paper-swatch-picker>
104+
<paper-slider id="penwidth" snaps min="1" max="5" value="2"></paper-slider>
105+
</span>
106+
</span>
106107
<span>
107-
<label for="theme" class="flex-item">Theme:</label>
108-
<select id="theme" class="flex-item">
109-
<option value="normal-white">Normal white theme</option>
110-
<option value="thin-green">Thin green theme</option>
111-
<option value="bold-red">Bold red theme</option>
112-
</select>
113-
</span>
108+
<label for="theme" class="flex-item">Theme:</label>
109+
<select id="theme" class="flex-item">
110+
<option value="normal-white">Normal white theme</option>
111+
<option value="thin-green">Thin green theme</option>
112+
<option value="bold-red">Bold red theme</option>
113+
</select>
114+
</span>
114115
</nav>
115116
<!-- Please change applicationkey and hmackey below with those send by mail during your registration. You can re-access them by connecting to your dashboard at developer.myscript.com with your myscript account -->
116117
<myscript-math-web scheme="https"

myscript-math-web.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ The `myscript-math-web` is a turnkey solution for those who need to quickly impl
3535
@demo examples/v3/websocket_math.html Configure component with legacy api [V3]
3636
@demo examples/index.html Other examples
3737
*/
38+
3839
class MyScriptMathWeb extends PolymerElement {
40+
3941
static get template() {
4042
return html`
4143
<style include="myscript-stylesheet">
@@ -94,11 +96,11 @@ class MyScriptMathWeb extends PolymerElement {
9496
height: 100%;
9597
}
9698
</style>
99+
97100
<myscript-math-exports hidden="[[ !_displayExports(hideexportzone, unloaded) ]]" exports="[[ exports ]]" debug="[[ debug ]]">
98101
</myscript-math-exports>
99-
<myscript-common-element type="MATH" protocol="[[ protocol ]]" apiversion="[[ apiversion ]]" host="[[ host ]]" usewindowlocation="[[ usewindowlocation ]]" scheme="[[ scheme ]]" applicationkey="[[ applicationkey ]]" hmackey="[[ hmackey ]]" triggerdelay="[[ triggerdelay ]]" processdelay="[[ processdelay ]]" ondemand="[[ ondemand ]]" debug="[[ debug ]]" configuration="{{ configuration }}" editor="{{ editor }}" exports="{{ exports }}" initialized="{{ initialized }}" unloaded="{{ commonunloaded }}" pencolor="[[ pencolor ]]" penwidth="[[ penwidth ]]" penstyle="[[ penstyle ]]" penstyleclasses="[[ penstyleclasses ]]" themecolor="[[ themecolor ]]" themewidth="[[ themewidth ]]" theme="[[ commontheme ]]" canclear="[[ canclear ]]" canredo="[[ canredo ]]" canundo="[[ canundo ]]" idle="[[ idle ]]" disableautoreconnect="[[ disableautoreconnect ]]" disablecontrols="[[ disablecontrols ]]" disableclearcontrol="[[ disableclearcontrol ]]" disableundoredocontrol="[[ disableundoredocontrol ]]" disableconvertcontrol="[[ disableconvertcontrol ]]" usepointerlisteners="[[ usepointerlisteners ]]" touch-action="[[&nbsp;touch-action ]]">
100-
</myscript-common-element>
101-
`;
102+
<myscript-common-element type="MATH" protocol="[[ protocol ]]" apiversion="[[ apiversion ]]" host="[[ host ]]" usewindowlocation="[[ usewindowlocation ]]" scheme="[[ scheme ]]" applicationkey="[[ applicationkey ]]" hmackey="[[ hmackey ]]" triggerdelay="[[ triggerdelay ]]" processdelay="[[ processdelay ]]" ondemand="[[ ondemand ]]" debug="[[ debug ]]" configuration="{{ configuration }}" editor="{{ editor }}" exports="{{ exports }}" initialized="{{ initialized }}" unloaded="{{ commonunloaded }}" pencolor="[[ pencolor ]]" penwidth="[[ penwidth ]]" penstyle="[[ penstyle ]]" penstyleclasses="[[ penstyleclasses ]]" themecolor="[[ themecolor ]]" themewidth="[[ themewidth ]]" theme="[[ commontheme ]]" canclear="[[ canclear ]]" canredo="[[ canredo ]]" canundo="[[ canundo ]]" idle="[[ idle ]]" disableautoreconnect="[[ disableautoreconnect ]]" disablecontrols="[[ disablecontrols ]]" disableclearcontrol="[[ disableclearcontrol ]]" disableundoredocontrol="[[ disableundoredocontrol ]]" disableconvertcontrol="[[ disableconvertcontrol ]]" usepointerlisteners="[[ usepointerlisteners ]]" touch-action="[[ touch-action ]]">
103+
</myscript-common-element>`;
102104
}
103105

104106
static get is() {

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
"myscript",
1111
"education",
1212
"write",
13-
14-
"math",
13+
"math",
1514
"handwriting",
1615
"recognition"
1716
],

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy