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

Commit e896530

Browse files
committed
[DEV] Refactor exportContent to match export_
1 parent 31e8df2 commit e896530

File tree

13 files changed

+74
-69
lines changed

13 files changed

+74
-69
lines changed

analysis.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7970,9 +7970,9 @@
79707970
"params": []
79717971
},
79727972
{
7973-
"name": "exportContent",
7973+
"name": "export_",
79747974
"description": "Launch export",
7975-
"privacy": "public",
7975+
"privacy": "private",
79767976
"sourceRange": {
79777977
"start": {
79787978
"line": 974,

docs/components/myscript-common-element/.bower.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@
4747
"paper-toggle-button": "^2.0.0",
4848
"paper-slider": "^2.0.2"
4949
},
50-
"_release": "7ccad6ed62",
50+
"_release": "58586781ad",
5151
"_resolution": {
5252
"type": "branch",
5353
"branch": "master",
54-
"commit": "7ccad6ed6290a5b459e0deafd15dae21a5b06b7e"
54+
"commit": "58586781adfe07209da1533bb2f550a6f66a18ee"
5555
},
5656
"_source": "https://github.com/MyScript/myscript-common-element.git",
5757
"_target": "master",

docs/components/myscript-common-element/analysis.json

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -801,7 +801,7 @@
801801
"column": 12
802802
},
803803
"end": {
804-
"line": 641,
804+
"line": 645,
805805
"column": 13
806806
}
807807
},
@@ -818,11 +818,11 @@
818818
"privacy": "protected",
819819
"sourceRange": {
820820
"start": {
821-
"line": 643,
821+
"line": 647,
822822
"column": 12
823823
},
824824
"end": {
825-
"line": 647,
825+
"line": 651,
826826
"column": 13
827827
}
828828
},
@@ -839,11 +839,11 @@
839839
"privacy": "protected",
840840
"sourceRange": {
841841
"start": {
842-
"line": 649,
842+
"line": 653,
843843
"column": 12
844844
},
845845
"end": {
846-
"line": 653,
846+
"line": 655,
847847
"column": 13
848848
}
849849
},
@@ -860,11 +860,11 @@
860860
"privacy": "protected",
861861
"sourceRange": {
862862
"start": {
863-
"line": 655,
863+
"line": 657,
864864
"column": 12
865865
},
866866
"end": {
867-
"line": 661,
867+
"line": 663,
868868
"column": 13
869869
}
870870
},
@@ -881,11 +881,11 @@
881881
"privacy": "protected",
882882
"sourceRange": {
883883
"start": {
884-
"line": 663,
884+
"line": 665,
885885
"column": 12
886886
},
887887
"end": {
888-
"line": 873,
888+
"line": 878,
889889
"column": 13
890890
}
891891
},
@@ -905,11 +905,11 @@
905905
"privacy": "protected",
906906
"sourceRange": {
907907
"start": {
908-
"line": 875,
908+
"line": 880,
909909
"column": 12
910910
},
911911
"end": {
912-
"line": 886,
912+
"line": 891,
913913
"column": 13
914914
}
915915
},
@@ -929,11 +929,11 @@
929929
"privacy": "public",
930930
"sourceRange": {
931931
"start": {
932-
"line": 893,
932+
"line": 898,
933933
"column": 12
934934
},
935935
"end": {
936-
"line": 908,
936+
"line": 913,
937937
"column": 13
938938
}
939939
},
@@ -946,11 +946,11 @@
946946
"privacy": "public",
947947
"sourceRange": {
948948
"start": {
949-
"line": 910,
949+
"line": 915,
950950
"column": 12
951951
},
952952
"end": {
953-
"line": 914,
953+
"line": 919,
954954
"column": 13
955955
}
956956
},
@@ -963,11 +963,11 @@
963963
"privacy": "public",
964964
"sourceRange": {
965965
"start": {
966-
"line": 919,
966+
"line": 924,
967967
"column": 12
968968
},
969969
"end": {
970-
"line": 923,
970+
"line": 928,
971971
"column": 13
972972
}
973973
},
@@ -980,11 +980,11 @@
980980
"privacy": "public",
981981
"sourceRange": {
982982
"start": {
983-
"line": 928,
983+
"line": 933,
984984
"column": 12
985985
},
986986
"end": {
987-
"line": 932,
987+
"line": 937,
988988
"column": 13
989989
}
990990
},
@@ -997,28 +997,28 @@
997997
"privacy": "public",
998998
"sourceRange": {
999999
"start": {
1000-
"line": 937,
1000+
"line": 942,
10011001
"column": 12
10021002
},
10031003
"end": {
1004-
"line": 941,
1004+
"line": 946,
10051005
"column": 13
10061006
}
10071007
},
10081008
"metadata": {},
10091009
"params": []
10101010
},
10111011
{
1012-
"name": "exportContent",
1012+
"name": "export_",
10131013
"description": "Trigger export",
1014-
"privacy": "public",
1014+
"privacy": "private",
10151015
"sourceRange": {
10161016
"start": {
1017-
"line": 946,
1017+
"line": 951,
10181018
"column": 12
10191019
},
10201020
"end": {
1021-
"line": 950,
1021+
"line": 955,
10221022
"column": 13
10231023
}
10241024
},
@@ -1031,11 +1031,11 @@
10311031
"privacy": "private",
10321032
"sourceRange": {
10331033
"start": {
1034-
"line": 957,
1034+
"line": 962,
10351035
"column": 12
10361036
},
10371037
"end": {
1038-
"line": 961,
1038+
"line": 966,
10391039
"column": 13
10401040
}
10411041
},
@@ -1057,11 +1057,11 @@
10571057
"privacy": "public",
10581058
"sourceRange": {
10591059
"start": {
1060-
"line": 987,
1060+
"line": 992,
10611061
"column": 12
10621062
},
10631063
"end": {
1064-
"line": 991,
1064+
"line": 996,
10651065
"column": 13
10661066
}
10671067
},
@@ -1080,11 +1080,11 @@
10801080
"privacy": "public",
10811081
"sourceRange": {
10821082
"start": {
1083-
"line": 996,
1083+
"line": 1001,
10841084
"column": 12
10851085
},
10861086
"end": {
1087-
"line": 1000,
1087+
"line": 1005,
10881088
"column": 13
10891089
}
10901090
},
@@ -1097,11 +1097,11 @@
10971097
"privacy": "public",
10981098
"sourceRange": {
10991099
"start": {
1100-
"line": 1006,
1100+
"line": 1011,
11011101
"column": 12
11021102
},
11031103
"end": {
1104-
"line": 1010,
1104+
"line": 1015,
11051105
"column": 13
11061106
}
11071107
},
@@ -1114,11 +1114,11 @@
11141114
"privacy": "protected",
11151115
"sourceRange": {
11161116
"start": {
1117-
"line": 1012,
1117+
"line": 1017,
11181118
"column": 12
11191119
},
11201120
"end": {
1121-
"line": 1017,
1121+
"line": 1022,
11221122
"column": 13
11231123
}
11241124
},
@@ -1144,11 +1144,11 @@
11441144
"privacy": "protected",
11451145
"sourceRange": {
11461146
"start": {
1147-
"line": 1019,
1147+
"line": 1024,
11481148
"column": 12
11491149
},
11501150
"end": {
1151-
"line": 1024,
1151+
"line": 1029,
11521152
"column": 13
11531153
}
11541154
},
@@ -1174,11 +1174,11 @@
11741174
"privacy": "protected",
11751175
"sourceRange": {
11761176
"start": {
1177-
"line": 1026,
1177+
"line": 1031,
11781178
"column": 12
11791179
},
11801180
"end": {
1181-
"line": 1031,
1181+
"line": 1036,
11821182
"column": 13
11831183
}
11841184
},
@@ -1198,11 +1198,11 @@
11981198
"privacy": "protected",
11991199
"sourceRange": {
12001200
"start": {
1201-
"line": 1033,
1201+
"line": 1038,
12021202
"column": 12
12031203
},
12041204
"end": {
1205-
"line": 1037,
1205+
"line": 1042,
12061206
"column": 13
12071207
}
12081208
},
@@ -1219,11 +1219,11 @@
12191219
"privacy": "protected",
12201220
"sourceRange": {
12211221
"start": {
1222-
"line": 1039,
1222+
"line": 1044,
12231223
"column": 12
12241224
},
12251225
"end": {
1226-
"line": 1060,
1226+
"line": 1065,
12271227
"column": 13
12281228
}
12291229
},
@@ -1273,7 +1273,7 @@
12731273
"column": 8
12741274
},
12751275
"end": {
1276-
"line": 1061,
1276+
"line": 1066,
12771277
"column": 9
12781278
}
12791279
},

docs/components/myscript-common-element/examples/non-version-specific/custom_controls.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
<button class="classic-btn" onclick="myscriptCommonElement.undo()">undo</button>
3535
<button class="classic-btn" onclick="myscriptCommonElement.redo()">redo</button>
3636
<button class="classic-btn" onclick="myscriptCommonElement.clear()">clear</button>
37-
<button class="classic-btn" onclick="myscriptCommonElement.exportContent()">export</button>
37+
<button class="classic-btn" onclick="myscriptCommonElement.export_()">export</button>
3838
<button class="classic-btn" onclick="myscriptCommonElement.convert()">convert</button>
3939
</nav>
4040
<paper-toast class="fit-top"></paper-toast>

docs/components/myscript-common-element/myscript-common-element.html

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,11 @@
633633
_changedListener(event) {
634634
if (event.detail) {
635635
this.initialized = event.detail.initialized;
636-
this.canclear = event.detail.canClear;
636+
if (event.detail.isEmpty !== undefined) {
637+
this.canclear = !event.detail.isEmpty;
638+
} else {
639+
this.canclear = event.detail.canClear;
640+
}
637641
this.canundo = event.detail.canUndo;
638642
this.canredo = event.detail.canRedo;
639643
this.canexport = event.detail.canExport;
@@ -649,8 +653,6 @@
649653

650654
_exportedListener(event) {
651655
this.exports = event.detail ? event.detail.exports : {};
652-
if (this.apiversion === 'V4')
653-
this.canclear = this.exports[Object.keys(this.exports)[0]] !== '';
654656
}
655657

656658
_errorListener(event) {
@@ -717,6 +719,9 @@
717719
evt.stopPropagation();
718720
editor.pointerDown(MyScriptCommonElement._extractPoint(evt, element, editor.configuration), evt.pointerType, evt.pointerId);
719721
}
722+
} else if (evt.target.id === 'ellipsis' || evt.target.id === 'tag-icon') {
723+
hideMenu(evt);
724+
hideCandidates(evt);
720725
} else { // FIXME add more complete verification to pointer down on smart guide
721726
hideMenu(evt);
722727
hideCandidates(evt);
@@ -944,9 +949,9 @@
944949
/**
945950
* Trigger export
946951
*/
947-
exportContent() {
952+
export_() {
948953
if (this.editor) {
949-
this.editor.exportContent();
954+
this.editor.export_();
950955
}
951956
}
952957

docs/components/myscript-text-web/analysis.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7970,9 +7970,9 @@
79707970
"params": []
79717971
},
79727972
{
7973-
"name": "exportContent",
7973+
"name": "export_",
79747974
"description": "Launch export",
7975-
"privacy": "public",
7975+
"privacy": "private",
79767976
"sourceRange": {
79777977
"start": {
79787978
"line": 974,

0 commit comments

Comments
 (0)