pxt-core 7.4.18 → 7.4.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/built/cli.js +6 -4
- package/built/pxt.js +6 -4
- package/built/pxtblockly.js +44 -28
- package/built/pxtblocks.js +31 -14
- package/built/pxteditor.d.ts +1 -0
- package/built/target.js +1 -1
- package/built/web/main.js +1 -1
- package/built/web/pxtasseteditor.js +1 -1
- package/built/web/pxtblockly.js +2 -2
- package/built/web/pxtblocks.js +1 -1
- package/built/web/pxtembed.js +2 -2
- package/built/web/react-common-skillmap.css +1 -1
- package/built/web/rtlreact-common-skillmap.css +1 -1
- package/built/web/rtlsemantic.css +3 -3
- package/built/web/semantic.css +3 -3
- package/built/web/skillmap/css/main.2d214a87.chunk.css +1 -0
- package/built/web/skillmap/js/2.f7cdfd75.chunk.js +2 -0
- package/built/web/skillmap/js/main.ace2b797.chunk.js +1 -0
- package/localtypings/pxtarget.d.ts +1 -0
- package/package.json +2 -2
- package/react-common/components/controls/Button.tsx +7 -3
- package/react-common/components/controls/FocusTrap.tsx +30 -4
- package/react-common/components/controls/MenuBar.tsx +8 -1
- package/react-common/components/controls/Modal.tsx +6 -3
- package/react-common/components/profile/BadgeInfo.tsx +9 -2
- package/react-common/components/profile/BadgeList.tsx +5 -5
- package/react-common/components/profile/Profile.tsx +5 -0
- package/react-common/components/profile/UserPane.tsx +9 -5
- package/react-common/components/types.d.ts +1 -0
- package/react-common/components/util.tsx +1 -0
- package/react-common/styles/controls/Button.less +37 -23
- package/react-common/styles/controls/MenuDropdown.less +1 -1
- package/react-common/styles/controls/Modal.less +2 -2
- package/react-common/styles/react-common-variables.less +3 -2
- package/theme/highcontrast.less +8 -7
- package/theme/image-editor/imageEditor.less +8 -0
- package/theme/tutorial-sidebar.less +99 -16
- package/theme/tutorial.less +16 -8
- package/webapp/public/blockly/blockly_compressed.js +7 -8
- package/webapp/public/blockly/blocks_compressed.js +6 -6
- package/webapp/public/skillmap.html +2 -2
- package/built/web/skillmap/css/main.56e8c859.chunk.css +0 -1
- package/built/web/skillmap/js/2.261d5eab.chunk.js +0 -2
- package/built/web/skillmap/js/main.7c45ef9f.chunk.js +0 -1
|
@@ -26,6 +26,11 @@ export const Profile = (props: ProfileProps) => {
|
|
|
26
26
|
header: lf("{0} Badge", badge.title),
|
|
27
27
|
size: "tiny",
|
|
28
28
|
hasCloseIcon: true,
|
|
29
|
+
onClose: () => {
|
|
30
|
+
// Hack to support retrapping focus in the fullscreen modal that contains this element
|
|
31
|
+
const focusable = document.body.querySelector(".common-modal-container.fullscreen [tabindex]");
|
|
32
|
+
if (focusable) (focusable as HTMLElement).focus();
|
|
33
|
+
},
|
|
29
34
|
jsx: <BadgeInfo badge={badge} />
|
|
30
35
|
});
|
|
31
36
|
}
|
|
@@ -2,6 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
import { fireClickOnEnter, CheckboxStatus } from "../util";
|
|
3
3
|
import { UserNotification } from "./UserNotification";
|
|
4
4
|
import { Checkbox } from "../controls/Checkbox";
|
|
5
|
+
import { Button } from "../controls/Button";
|
|
5
6
|
|
|
6
7
|
export interface UserPaneProps {
|
|
7
8
|
profile: pxt.auth.UserProfile;
|
|
@@ -21,7 +22,7 @@ export const UserPane = (props: UserPaneProps) => {
|
|
|
21
22
|
const emailLabel = <>
|
|
22
23
|
{emailChecked === CheckboxStatus.Waiting ? <div className="common-spinner" /> : undefined}
|
|
23
24
|
{lf("I would like to receive the MakeCode newsletter. ")}
|
|
24
|
-
<a href="https://makecode.com/privacy" target="_blank" rel="noopener noreferrer">{lf("View Privacy Statement")}</a>
|
|
25
|
+
<a href="https://makecode.com/privacy" target="_blank" rel="noopener noreferrer" tabIndex={0}>{lf("View Privacy Statement")}</a>
|
|
25
26
|
</>
|
|
26
27
|
|
|
27
28
|
return <div className="profile-user-pane">
|
|
@@ -59,10 +60,13 @@ export const UserPane = (props: UserPaneProps) => {
|
|
|
59
60
|
onClick={onDeleteProfileClick}>
|
|
60
61
|
{lf("Delete Profile")}
|
|
61
62
|
</a>
|
|
62
|
-
<
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
<Button
|
|
64
|
+
className="sign-out"
|
|
65
|
+
leftIcon="fas fa-sign-out-alt"
|
|
66
|
+
title={lf("Sign Out")}
|
|
67
|
+
label={lf("Sign Out")}
|
|
68
|
+
onClick={onSignOutClick}
|
|
69
|
+
/>
|
|
66
70
|
</div>
|
|
67
71
|
</div>
|
|
68
72
|
}
|
|
@@ -32,22 +32,6 @@
|
|
|
32
32
|
margin-left: 0.5rem;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
.common-button:focus::after {
|
|
36
|
-
content: "";
|
|
37
|
-
position: absolute;
|
|
38
|
-
inset: 4px;
|
|
39
|
-
border: 1px solid transparent;
|
|
40
|
-
outline: @buttonFocusOutline;
|
|
41
|
-
z-index: 1;
|
|
42
|
-
border-radius: 0.2em;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.common-button.inverted:focus::after,
|
|
46
|
-
.common-button.menu-button:focus::after {
|
|
47
|
-
outline: @buttonFocusOutlineInverted;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
|
|
51
35
|
/****************************************************
|
|
52
36
|
* Color Variants *
|
|
53
37
|
****************************************************/
|
|
@@ -142,6 +126,34 @@
|
|
|
142
126
|
border: @buttonBackgroundColorDisabled;
|
|
143
127
|
}
|
|
144
128
|
|
|
129
|
+
/****************************************************
|
|
130
|
+
* Focus *
|
|
131
|
+
****************************************************/
|
|
132
|
+
|
|
133
|
+
.common-button:focus::after {
|
|
134
|
+
content: "";
|
|
135
|
+
position: absolute;
|
|
136
|
+
inset: 4px;
|
|
137
|
+
border: 1px solid transparent;
|
|
138
|
+
outline: @buttonFocusOutlineLightBackground;
|
|
139
|
+
z-index: 1;
|
|
140
|
+
border-radius: 0.2em;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.common-button.menu-button:focus::after,
|
|
144
|
+
.common-button.primary:focus::after,
|
|
145
|
+
.common-button.secondary:focus::after,
|
|
146
|
+
.common-button.teal:focus::after,
|
|
147
|
+
.common-button.orange:focus::after,
|
|
148
|
+
.common-button.red:focus::after,
|
|
149
|
+
.common-button.green:focus::after {
|
|
150
|
+
outline: @buttonFocusOutlineDarkBackground;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.common-button.inverted:focus::after {
|
|
154
|
+
outline: @buttonFocusOutlineLightBackground;
|
|
155
|
+
}
|
|
156
|
+
|
|
145
157
|
|
|
146
158
|
/****************************************************
|
|
147
159
|
* Menu Buttons *
|
|
@@ -180,13 +192,15 @@
|
|
|
180
192
|
* High Contrast *
|
|
181
193
|
****************************************************/
|
|
182
194
|
|
|
183
|
-
.high-contrast .
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
195
|
+
.high-contrast, .hc {
|
|
196
|
+
.common-button {
|
|
197
|
+
color: @highContrastTextColor !important;
|
|
198
|
+
background: @highContrastBackgroundColor !important;
|
|
199
|
+
border-color: @highContrastTextColor !important;
|
|
187
200
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
201
|
+
&:hover, &:focus {
|
|
202
|
+
outline: @highContrastFocusOutline !important;
|
|
203
|
+
z-index: @highContrastFocusZIndex;
|
|
204
|
+
}
|
|
191
205
|
}
|
|
192
206
|
}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
right: 0;
|
|
9
9
|
bottom: 0;
|
|
10
10
|
background-color: var(--modal-overlay-color);
|
|
11
|
-
z-index:
|
|
11
|
+
z-index: @modalDimmerZIndex;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
.common-modal-container.fullscreen {
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
* High Contrast *
|
|
109
109
|
****************************************************/
|
|
110
110
|
|
|
111
|
-
.high-contrast {
|
|
111
|
+
.high-contrast, .hc {
|
|
112
112
|
.common-modal-header,
|
|
113
113
|
.common-modal-body,
|
|
114
114
|
.common-modal-footer {
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
@buttonMenuTextColor: #ffffff;
|
|
15
15
|
@buttonMenuTextColorInverted: @primaryColor;
|
|
16
16
|
@buttonMenuBackgroundColorInverted: @buttonMenuTextColor;
|
|
17
|
-
@
|
|
18
|
-
@
|
|
17
|
+
@buttonFocusOutlineDarkBackground: @buttonTextColorInverted solid 1px;;
|
|
18
|
+
@buttonFocusOutlineLightBackground: @commonBorderColor solid 1px;
|
|
19
19
|
@buttonMenuBackgroundHoverColor: rgba(0,0,0,.1);
|
|
20
20
|
@buttonMenuBackgroundActiveColor: rgba(0,0,0,.15);
|
|
21
21
|
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
@modalHeaderBackgroundColor: @modalBodyBackgroundColor;
|
|
29
29
|
@modalFooterBackgroundColor: #f9fafb;
|
|
30
30
|
@modalSeparatorBorder: 1px solid rgba(34, 36, 38, .15);
|
|
31
|
+
@modalDimmerZIndex: 1000;
|
|
31
32
|
|
|
32
33
|
|
|
33
34
|
/****************************************************
|
package/theme/highcontrast.less
CHANGED
|
@@ -675,7 +675,8 @@
|
|
|
675
675
|
#assetEditor {
|
|
676
676
|
.asset-editor-sidebar,
|
|
677
677
|
.asset-editor-sidebar-preview,
|
|
678
|
-
.asset-editor-preview
|
|
678
|
+
.asset-editor-preview,
|
|
679
|
+
.asset-editor-sidebar-temp {
|
|
679
680
|
color: @HCtextColor;
|
|
680
681
|
background-color: @HCbackground;
|
|
681
682
|
border-color: @HCtextColor;
|
|
@@ -691,7 +692,10 @@
|
|
|
691
692
|
border-bottom: 1px solid @HCtextColor;
|
|
692
693
|
}
|
|
693
694
|
|
|
694
|
-
.
|
|
695
|
+
.common-button {
|
|
696
|
+
border: 1px solid;
|
|
697
|
+
}
|
|
698
|
+
|
|
695
699
|
.asset-editor-card,
|
|
696
700
|
.create-new {
|
|
697
701
|
color: @HCtextColor;
|
|
@@ -704,10 +708,7 @@
|
|
|
704
708
|
color: @HCbackground;
|
|
705
709
|
}
|
|
706
710
|
|
|
707
|
-
.
|
|
708
|
-
border: 1px solid @red;
|
|
709
|
-
}
|
|
710
|
-
|
|
711
|
+
.asset-editor-card.selected,
|
|
711
712
|
.asset-editor-gallery-tab.selected,
|
|
712
713
|
.asset-editor-button:hover,
|
|
713
714
|
.create-new:hover {
|
|
@@ -819,7 +820,7 @@
|
|
|
819
820
|
}
|
|
820
821
|
}
|
|
821
822
|
|
|
822
|
-
.tutorialhint {
|
|
823
|
+
.tutorialhint, .tutorial-hint .tutorial-callout {
|
|
823
824
|
border-color: @HCtextColor;
|
|
824
825
|
background-color: @HCbackground;
|
|
825
826
|
color: @HCtextColor;
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
@tutorialPrimaryColor: @teal;
|
|
6
6
|
@tutorialSecondaryColor: @blue;
|
|
7
|
+
@tutorialLinkColor: #0064BF;
|
|
8
|
+
@tutorialLinkHoverColor: #003C94;
|
|
7
9
|
|
|
8
10
|
@tutorialTabletButtonColor: #f3f3f3;
|
|
9
11
|
@tutorialTabletSimulatorButtonColor: rgba(0, 0, 0, 0.05);
|
|
@@ -66,6 +68,10 @@
|
|
|
66
68
|
background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0), @white);
|
|
67
69
|
}
|
|
68
70
|
|
|
71
|
+
.tutorial-replace-code + .tutorial-scroll-gradient {
|
|
72
|
+
bottom: 9rem;
|
|
73
|
+
}
|
|
74
|
+
|
|
69
75
|
.tutorial-container,
|
|
70
76
|
.tutorial-controls {
|
|
71
77
|
.ui.button, .ui.button:hover {
|
|
@@ -188,7 +194,7 @@
|
|
|
188
194
|
Tutorial Hint
|
|
189
195
|
*******************************/
|
|
190
196
|
|
|
191
|
-
.tutorial-hint.ui.button {
|
|
197
|
+
.tutorial-hint .ui.button {
|
|
192
198
|
height: 3.2rem;
|
|
193
199
|
width: 3.2rem;
|
|
194
200
|
margin: 0;
|
|
@@ -196,8 +202,8 @@
|
|
|
196
202
|
font-size: @tutorialTitleFontSize;
|
|
197
203
|
}
|
|
198
204
|
|
|
199
|
-
.tutorial-hint.ui.button,
|
|
200
|
-
.tutorial-hint.ui.button > i {
|
|
205
|
+
.tutorial-hint .ui.button,
|
|
206
|
+
.tutorial-hint .ui.button > i {
|
|
201
207
|
display: flex;
|
|
202
208
|
align-items: center;
|
|
203
209
|
justify-content: center;
|
|
@@ -205,7 +211,7 @@
|
|
|
205
211
|
|
|
206
212
|
// Overrides, largely using old tutorial hint CSS
|
|
207
213
|
.tab-tutorial {
|
|
208
|
-
.
|
|
214
|
+
.tutorial-callout {
|
|
209
215
|
position: fixed;
|
|
210
216
|
top: unset;
|
|
211
217
|
right: unset;
|
|
@@ -214,15 +220,32 @@
|
|
|
214
220
|
max-width: 50%;
|
|
215
221
|
}
|
|
216
222
|
|
|
217
|
-
.
|
|
223
|
+
.tutorial-callout:before {
|
|
218
224
|
top: auto;
|
|
219
225
|
left: 6.5rem;
|
|
220
226
|
bottom: -2.5rem;
|
|
221
227
|
transform: rotate(-90deg);
|
|
222
228
|
}
|
|
229
|
+
|
|
230
|
+
.tutorial-callout-close.ui.button {
|
|
231
|
+
position: absolute;
|
|
232
|
+
right: 1rem;
|
|
233
|
+
padding: 0;
|
|
234
|
+
width: 1.5rem;
|
|
235
|
+
height: 1.5rem;
|
|
236
|
+
color: @white;
|
|
237
|
+
background-color: #000;
|
|
238
|
+
border-radius: 50%;
|
|
239
|
+
|
|
240
|
+
i.icon {
|
|
241
|
+
opacity: 1;
|
|
242
|
+
font-size: 1rem;
|
|
243
|
+
margin: 0 !important;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
223
246
|
}
|
|
224
247
|
|
|
225
|
-
.tutorial-
|
|
248
|
+
.tutorial-callout-mask {
|
|
226
249
|
position: fixed;
|
|
227
250
|
top: 0;
|
|
228
251
|
left: 0;
|
|
@@ -274,6 +297,41 @@
|
|
|
274
297
|
border-bottom: 2px solid @tutorialPrimaryColor;
|
|
275
298
|
}
|
|
276
299
|
|
|
300
|
+
/*******************************
|
|
301
|
+
Tutorial Replace Code
|
|
302
|
+
*******************************/
|
|
303
|
+
.tutorial-replace-code {
|
|
304
|
+
display: flex;
|
|
305
|
+
justify-content: center;
|
|
306
|
+
font-family: @segoeUIFont;
|
|
307
|
+
|
|
308
|
+
.tutorial-callout-button.ui.button {
|
|
309
|
+
padding: 0;
|
|
310
|
+
margin: 0 0 2rem;
|
|
311
|
+
color: @tutorialLinkColor;
|
|
312
|
+
background: none transparent;
|
|
313
|
+
font-family: @segoeUIFont;
|
|
314
|
+
font-weight: 500;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
.tutorial-callout-button.ui.button:hover,
|
|
318
|
+
.tutorial-callout-button.ui.button:focus {
|
|
319
|
+
color: @tutorialLinkHoverColor;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
.tutorial-callout {
|
|
323
|
+
bottom: 13.5rem;
|
|
324
|
+
padding: 1rem;
|
|
325
|
+
max-width: 32rem;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
.tutorial-replace-code-actions {
|
|
329
|
+
display: flex;
|
|
330
|
+
justify-content: flex-end;
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
|
|
277
335
|
/*******************************
|
|
278
336
|
Simulator Tab
|
|
279
337
|
*******************************/
|
|
@@ -419,6 +477,7 @@
|
|
|
419
477
|
padding: 1rem;
|
|
420
478
|
}
|
|
421
479
|
|
|
480
|
+
.tutorial-replace-code + .tutorial-scroll-gradient,
|
|
422
481
|
.tutorial-scroll-gradient {
|
|
423
482
|
width: calc(~'100% - 15rem');
|
|
424
483
|
bottom: 0;
|
|
@@ -482,8 +541,6 @@
|
|
|
482
541
|
flex-direction: column;
|
|
483
542
|
align-items: center;
|
|
484
543
|
justify-content: center;
|
|
485
|
-
width: 4rem;
|
|
486
|
-
height: unset;
|
|
487
544
|
margin: 0;
|
|
488
545
|
font-size: 1rem;
|
|
489
546
|
|
|
@@ -491,7 +548,6 @@
|
|
|
491
548
|
display: flex;
|
|
492
549
|
align-items: center;
|
|
493
550
|
justify-content: center;
|
|
494
|
-
margin-bottom: 0.5rem!important;
|
|
495
551
|
font-size: 2rem;
|
|
496
552
|
}
|
|
497
553
|
|
|
@@ -516,6 +572,10 @@
|
|
|
516
572
|
}
|
|
517
573
|
}
|
|
518
574
|
|
|
575
|
+
.tutorial-container > .ui.button i.icon {
|
|
576
|
+
margin-bottom: 0.5rem!important;
|
|
577
|
+
}
|
|
578
|
+
|
|
519
579
|
/*******************************
|
|
520
580
|
Tutorial Hint
|
|
521
581
|
*******************************/
|
|
@@ -526,8 +586,7 @@
|
|
|
526
586
|
margin: 0;
|
|
527
587
|
}
|
|
528
588
|
|
|
529
|
-
.tutorial-hint.ui.button {
|
|
530
|
-
border-radius: 0.2rem;
|
|
589
|
+
.tutorial-hint .tutorial-callout-button.ui.button {
|
|
531
590
|
color: @tutorialPrimaryColor;
|
|
532
591
|
background: @tutorialSecondaryColor;
|
|
533
592
|
margin: 1rem;
|
|
@@ -539,23 +598,47 @@
|
|
|
539
598
|
|
|
540
599
|
// Overrides
|
|
541
600
|
.tab-tutorial {
|
|
542
|
-
.
|
|
543
|
-
top: 18.5rem;
|
|
601
|
+
.tutorial-callout {
|
|
544
602
|
right: 1.6rem;
|
|
545
603
|
bottom: unset;
|
|
546
604
|
left: unset;
|
|
547
605
|
max-width: 80%;
|
|
606
|
+
transform: translateY(15px);
|
|
548
607
|
}
|
|
549
608
|
|
|
550
|
-
.
|
|
609
|
+
.tutorial-callout:before {
|
|
551
610
|
top: -2.5rem;
|
|
552
611
|
left: unset;
|
|
553
612
|
bottom: auto;
|
|
554
|
-
right:
|
|
613
|
+
right: 3.5rem;
|
|
555
614
|
transform: rotate(90deg);
|
|
556
615
|
}
|
|
557
616
|
}
|
|
558
617
|
|
|
618
|
+
/*******************************
|
|
619
|
+
Tutorial Replace Code
|
|
620
|
+
*******************************/
|
|
621
|
+
|
|
622
|
+
.tutorial-replace-code {
|
|
623
|
+
position: absolute;
|
|
624
|
+
right: 4.5rem;
|
|
625
|
+
bottom: -0.5rem;
|
|
626
|
+
width: 4rem;
|
|
627
|
+
|
|
628
|
+
.tutorial-callout {
|
|
629
|
+
max-width: 32rem;
|
|
630
|
+
transform: translateY(65px);
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
.tutorial-replace-code-actions .ui.button {
|
|
634
|
+
width: unset;
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
.tutorial-replace-code ~ .tutorial-controls > .tutorial-hint {
|
|
639
|
+
width: 5rem;
|
|
640
|
+
}
|
|
641
|
+
|
|
559
642
|
|
|
560
643
|
/*******************************
|
|
561
644
|
Simulator Tab
|
|
@@ -639,7 +722,7 @@
|
|
|
639
722
|
background-color: @tutorialPrimaryColor;
|
|
640
723
|
}
|
|
641
724
|
|
|
642
|
-
.tutorial-hint.ui.button {
|
|
725
|
+
.tutorial-hint .tutorial-callout-button.ui.button {
|
|
643
726
|
flex-direction: row;
|
|
644
727
|
width: 12rem;
|
|
645
728
|
margin: 3.5rem 1rem 0;
|
package/theme/tutorial.less
CHANGED
|
@@ -169,7 +169,8 @@ body#docs.tutorial {
|
|
|
169
169
|
}
|
|
170
170
|
|
|
171
171
|
#tutorialcard .tutorialmessage .content p,
|
|
172
|
-
.tutorialhint p
|
|
172
|
+
.tutorialhint p,
|
|
173
|
+
.tutorial-callout p {
|
|
173
174
|
line-height: 1.4em !important;
|
|
174
175
|
color: @tutorialSegmentColor;
|
|
175
176
|
}
|
|
@@ -222,13 +223,15 @@ body#docs.tutorial {
|
|
|
222
223
|
|
|
223
224
|
@media only screen and (min-height: 400px) {
|
|
224
225
|
.hintdialog .ui.segment .blocklyPreview,
|
|
225
|
-
.tutorialhint .ui.segment .blocklyPreview
|
|
226
|
+
.tutorialhint .ui.segment .blocklyPreview,
|
|
227
|
+
.tutorial-callout .ui.segment .blocklyPreview {
|
|
226
228
|
max-height: 45vh;
|
|
227
229
|
}
|
|
228
230
|
}
|
|
229
231
|
|
|
230
232
|
@media only screen and (max-height: 800px) {
|
|
231
|
-
.tutorialhint img
|
|
233
|
+
.tutorialhint img,
|
|
234
|
+
.tutorial-callout img {
|
|
232
235
|
max-height: 30vh;
|
|
233
236
|
}
|
|
234
237
|
}
|
|
@@ -358,7 +361,8 @@ code.lang-filterblocks {
|
|
|
358
361
|
}
|
|
359
362
|
}
|
|
360
363
|
|
|
361
|
-
.tutorialhint
|
|
364
|
+
.tutorialhint,
|
|
365
|
+
.tutorial-callout {
|
|
362
366
|
position: absolute;
|
|
363
367
|
max-width: 100%;
|
|
364
368
|
min-width: 300px;
|
|
@@ -372,7 +376,8 @@ code.lang-filterblocks {
|
|
|
372
376
|
box-shadow: 0px 0px 8px 1px rgba(0, 0, 0, .3);
|
|
373
377
|
}
|
|
374
378
|
|
|
375
|
-
.tutorialhint:before
|
|
379
|
+
.tutorialhint:before,
|
|
380
|
+
.tutorial-callout:before {
|
|
376
381
|
content: ' ';
|
|
377
382
|
position: absolute;
|
|
378
383
|
width: 0;
|
|
@@ -385,16 +390,19 @@ code.lang-filterblocks {
|
|
|
385
390
|
transform: rotateZ(-135deg);
|
|
386
391
|
}
|
|
387
392
|
|
|
388
|
-
.tutorialhint > div
|
|
393
|
+
.tutorialhint > div,
|
|
394
|
+
.tutorial-callout > div {
|
|
389
395
|
max-height: 60vh;
|
|
390
396
|
overflow: auto;
|
|
391
397
|
}
|
|
392
398
|
|
|
393
|
-
.tutorialhint.hidden
|
|
399
|
+
.tutorialhint.hidden,
|
|
400
|
+
.tutorial-callout.hidden {
|
|
394
401
|
display: none;
|
|
395
402
|
}
|
|
396
403
|
|
|
397
|
-
.tutorialhint .lang-blocks .segment.raised
|
|
404
|
+
.tutorialhint .lang-blocks .segment.raised,
|
|
405
|
+
.tutorial-callout .lang-blocks .segment.raised {
|
|
398
406
|
border: none;
|
|
399
407
|
background: none;
|
|
400
408
|
box-shadow: none;
|
|
@@ -701,7 +701,7 @@ Blockly.FieldLabel.prototype.setClass=function(a){this.textElement_&&(this.class
|
|
|
701
701
|
*/
|
|
702
702
|
Blockly.FieldLabelHover=function(a,b){Blockly.FieldLabelHover.superClass_.constructor.call(this,a,b);this.arrowWidth_=0};Blockly.utils.object.inherits(Blockly.FieldLabelHover,Blockly.FieldLabel);
|
|
703
703
|
Blockly.FieldLabelHover.prototype.initView=function(){Blockly.FieldLabelHover.superClass_.initView.call(this);this.sourceBlock_.isEditable()&&(this.mouseOverWrapper_=Blockly.bindEvent_(this.getClickTarget_(),"mouseover",this,this.onMouseOver_),this.mouseOutWrapper_=Blockly.bindEvent_(this.getClickTarget_(),"mouseout",this,this.onMouseOut_))};Blockly.FieldLabelHover.fromJson=function(a){var b=Blockly.utils.replaceMessageReferences(a.text);return new Blockly.FieldLabelHover(b,a["class"])};
|
|
704
|
-
Blockly.FieldLabelHover.prototype.EDITABLE=!1;Blockly.FieldLabelHover.prototype.SERIALIZABLE=!0;Blockly.FieldLabelHover.prototype.updateWidth=function(){this.size_.width=Blockly.utils.dom.getFastTextWidth(this.textElement_,this.
|
|
704
|
+
Blockly.FieldLabelHover.prototype.EDITABLE=!1;Blockly.FieldLabelHover.prototype.SERIALIZABLE=!0;Blockly.FieldLabelHover.prototype.updateWidth=function(){this.size_.width=Blockly.utils.dom.getFastTextWidth(this.textElement_,this.getConstants().FIELD_TEXT_FONTSIZE,this.getConstants().FIELD_TEXT_FONTWEIGHT,this.getConstants().FIELD_TEXT_FONTFAMILY)};
|
|
705
705
|
Blockly.FieldLabelHover.prototype.onMouseOver_=function(a){!this.sourceBlock_.isInFlyout&&this.sourceBlock_.isShadow()&&(a=this.sourceBlock_.workspace.getGesture(a),a&&a.isDragging()||!this.sourceBlock_.pathObject.svgPath||(Blockly.utils.dom.addClass(this.sourceBlock_.pathObject.svgPath,"blocklyFieldHover"),this.sourceBlock_.pathObject.svgPath.style.strokeDasharray="2"))};
|
|
706
706
|
Blockly.FieldLabelHover.prototype.clearHover=function(){this.sourceBlock_.pathObject.svgPath&&(Blockly.utils.dom.removeClass(this.sourceBlock_.pathObject.svgPath,"blocklyFieldHover"),this.sourceBlock_.pathObject.svgPath.style.strokeDasharray="")};Blockly.FieldLabelHover.prototype.onMouseOut_=function(a){!this.sourceBlock_.isInFlyout&&this.sourceBlock_.isShadow()&&((a=this.sourceBlock_.workspace.getGesture(a))&&a.isDragging()||this.clearHover())};
|
|
707
707
|
Blockly.FieldLabelHover.dispose=function(){this.mouseOverWrapper_&&(Blockly.unbindEvent_(this.mouseOverWrapper_),this.mouseOverWrapper_=null);this.mouseOutWrapper_&&(Blockly.unbindEvent_(this.mouseOutWrapper_),this.mouseOutWrapper_=null);Blockly.FieldLabelHover.superClass_.dispose.call(this);this.variableMap_=this.workspace_=null};Blockly.fieldRegistry.register("field_label_hover",Blockly.FieldLabelHover);Blockly.FieldVariableGetter=function(a,b,c,d,e){this.defaultVariableName=a||"";this.size_=new Blockly.utils.Size(0,0);e&&this.configure_(e);b&&this.setValidator(b);e||this.setTypes_(c,d)};Blockly.utils.object.inherits(Blockly.FieldVariableGetter,Blockly.Field);Blockly.FieldVariableGetter.fromJson=function(a){var b=Blockly.utils.replaceMessageReferences(a.variable);return new Blockly.FieldVariableGetter(b,null,a.variableTypes,a.defaultType)};Blockly.FieldVariableGetter.prototype.workspace_=null;
|
|
@@ -1656,7 +1656,7 @@ return Blockly.Functions.namesInUse(b,null,a)[c]?(Blockly.alert(Blockly.Msg.VARI
|
|
|
1656
1656
|
Blockly.Functions.mutateCallersAndDefinition=function(a,b,c){var d=Blockly.Functions.getDefinition(a,b);d?(a=Blockly.Functions.getCallers(a,d.workspace),a.push(d),Blockly.Events.setGroup(!0),a.forEach(function(a){var b=a.mutationToDom(),e=b&&Blockly.Xml.domToText(b);a.domToMutation(c);var h=a.mutationToDom(),k=h&&Blockly.Xml.domToText(h);if(e!=k)if(Blockly.Events.fire(new Blockly.Events.BlockChange(a,"mutation",null,e,k)),a.id==d.id){var l=Blockly.Functions.getArgMap(b),m=Blockly.Functions.getArgMap(h,
|
|
1657
1657
|
!0);d.getDescendants().forEach(function(a){if(Blockly.pxtBlocklyUtils.isFunctionArgumentReporter(a)){var b=a.getFieldValue("VALUE"),c=l[b];m[c]?m[c]!==b&&a.setFieldValue(m[c],"VALUE"):a.dispose()}})}else setTimeout(function(){a.bumpNeighbours()},Blockly.BUMP_DELAY)}),Blockly.Events.setGroup(!1)):console.warn("Attempted to change function "+a+", but no definition block was found on the workspace")};
|
|
1658
1658
|
Blockly.Functions.createFlyout=function(a,b){var c=new Blockly.Options({scrollbars:!0,disabledPatternId:a.options.disabledPatternId,parentWorkspace:a,rtl:a.RTL,oneBasedIndex:a.options.oneBasedIndex,horizontalLayout:a.horizontalLayout,toolboxPosition:a.options.toolboxPosition,zoomOptions:a.options.zoomOptions,renderer:a.options.renderer,rendererOverrides:a.options.rendererOverrides,newFunctions:a.options.newFunctions,move:{scrollbars:!0}});c=c.horizontalLayout?new Blockly.HorizontalFlyout(c):new Blockly.VerticalFlyout(c);
|
|
1659
|
-
var d=c.createDom("svg");goog.dom.insertSiblingAfter(d,b);c.init(a);return c};Blockly.VERSION="4.0.
|
|
1659
|
+
var d=c.createDom("svg");goog.dom.insertSiblingAfter(d,b);c.init(a);return c};Blockly.VERSION="4.0.8";Blockly.mainWorkspace=null;Blockly.selected=null;Blockly.draggingConnections=[];Blockly.clipboardXml_=null;Blockly.clipboardSource_=null;Blockly.clipboardTypeCounts_=null;Blockly.cache3dSupported_=null;Blockly.parentContainer=null;Blockly.svgSize=function(a){Blockly.utils.deprecation.warn("Blockly.svgSize","March 2021","March 2022","workspace.getCachedParentSvgSize");return new Blockly.utils.Size(a.cachedWidth_,a.cachedHeight_)};Blockly.resizeSvgContents=function(a){a.resizeContents()};
|
|
1660
1660
|
Blockly.svgResize=function(a){for(;a.options.parentWorkspace;)a=a.options.parentWorkspace;var b=a.getParentSvg(),c=a.getCachedParentSvgSize(),d=b.parentNode;if(d){var e=d.offsetWidth;d=d.offsetHeight;c.width!=e&&(b.setAttribute("width",e+"px"),a.setCachedParentSvgSize(e,null));c.height!=d&&(b.setAttribute("height",d+"px"),a.setCachedParentSvgSize(null,d));a.resize()}};
|
|
1661
1661
|
Blockly.onKeyDown=function(a){var b=Blockly.mainWorkspace;if(b&&!(Blockly.utils.isTargetInput(a)||b.rendered&&!b.isVisible()))Blockly.ShortcutRegistry.registry.onKeyDown(b,a)};Blockly.deleteBlock=function(a){a.workspace.isFlyout||(Blockly.Events.setGroup(!0),Blockly.hideChaff(),a.outputConnection?a.dispose(!1,!0):a.dispose(!0,!0),Blockly.Events.setGroup(!1))};Blockly.copy=function(a){if(a=a.toCopyData())Blockly.clipboardXml_=a.xml,Blockly.clipboardSource_=a.source,Blockly.clipboardTypeCounts_=a.typeCounts};
|
|
1662
1662
|
Blockly.paste=function(){if(!Blockly.clipboardXml_)return!1;var a=Blockly.clipboardSource_;a.isFlyout&&(a=a.targetWorkspace);return Blockly.clipboardTypeCounts_&&a.isCapacityAvailable(Blockly.clipboardTypeCounts_)?(Blockly.Events.setGroup(!0),a.paste(Blockly.clipboardXml_),Blockly.Events.setGroup(!1),!0):!1};
|
|
@@ -1986,8 +1986,7 @@ Blockly.ContextMenuItems.registerDisable=function(){Blockly.ContextMenuRegistry.
|
|
|
1986
1986
|
scopeType:Blockly.ContextMenuRegistry.ScopeType.BLOCK,id:"blockDisable",weight:5})};
|
|
1987
1987
|
Blockly.ContextMenuItems.registerDelete=function(){Blockly.ContextMenuRegistry.registry.register({displayText:function(a){var b=a.block;a=b.getDescendants(!1).length;(b=b.getNextBlock())&&(a-=b.getDescendants(!1).length);return 1==a?Blockly.Msg.DELETE_BLOCK:Blockly.Msg.DELETE_X_BLOCKS.replace("%1",String(a))},preconditionFn:function(a){return!a.block.isInFlyout&&a.block.isDeletable()?"enabled":"hidden"},callback:function(a){Blockly.Events.setGroup(!0);a.block&&Blockly.deleteBlock(a.block);Blockly.Events.setGroup(!1)},
|
|
1988
1988
|
scopeType:Blockly.ContextMenuRegistry.ScopeType.BLOCK,id:"blockDelete",weight:6})};Blockly.ContextMenuItems.registerHelp=function(){Blockly.ContextMenuRegistry.registry.register({displayText:function(){return Blockly.Msg.HELP},preconditionFn:function(a){a=a.block;return("function"==typeof a.helpUrl?a.helpUrl():a.helpUrl)?"enabled":"hidden"},callback:function(a){a.block.showHelp()},scopeType:Blockly.ContextMenuRegistry.ScopeType.BLOCK,id:"blockHelp",weight:7})};
|
|
1989
|
-
Blockly.ContextMenuItems.registerBlockOptions_=function(){Blockly.ContextMenuItems.registerDuplicate();Blockly.ContextMenuItems.registerComment();Blockly.ContextMenuItems.
|
|
1990
|
-
Blockly.ContextMenuItems.registerDefaultOptions();Blockly.Mutator=function(a){Blockly.Mutator.superClass_.constructor.call(this,null);this.quarkNames_=a};Blockly.utils.object.inherits(Blockly.Mutator,Blockly.Icon);Blockly.Mutator.prototype.workspace_=null;Blockly.Mutator.prototype.workspaceWidth_=0;Blockly.Mutator.prototype.workspaceHeight_=0;Blockly.Mutator.prototype.setBlock=function(a){this.block_=a};Blockly.Mutator.prototype.getWorkspace=function(){return this.workspace_};
|
|
1989
|
+
Blockly.ContextMenuItems.registerBlockOptions_=function(){Blockly.ContextMenuItems.registerDuplicate();Blockly.ContextMenuItems.registerComment();Blockly.ContextMenuItems.registerCollapseExpandBlock();Blockly.ContextMenuItems.registerDisable();Blockly.ContextMenuItems.registerDelete();Blockly.ContextMenuItems.registerHelp()};Blockly.ContextMenuItems.registerDefaultOptions=function(){Blockly.ContextMenuItems.registerWorkspaceOptions_();Blockly.ContextMenuItems.registerBlockOptions_()};Blockly.ContextMenuItems.registerDefaultOptions();Blockly.Mutator=function(a){Blockly.Mutator.superClass_.constructor.call(this,null);this.quarkNames_=a};Blockly.utils.object.inherits(Blockly.Mutator,Blockly.Icon);Blockly.Mutator.prototype.workspace_=null;Blockly.Mutator.prototype.workspaceWidth_=0;Blockly.Mutator.prototype.workspaceHeight_=0;Blockly.Mutator.prototype.setBlock=function(a){this.block_=a};Blockly.Mutator.prototype.getWorkspace=function(){return this.workspace_};
|
|
1991
1990
|
Blockly.Mutator.prototype.drawIcon_=function(a){Blockly.utils.dom.createSvgElement(Blockly.utils.Svg.RECT,{"class":"blocklyIconShape",rx:"10",ry:"10",height:"16",width:"16"},a);Blockly.utils.dom.createSvgElement(Blockly.utils.Svg.PATH,{"class":"blocklyIconSymbol",d:"m4.203,7.296 0,1.368 -0.92,0.677 -0.11,0.41 0.9,1.559 0.41,0.11 1.043,-0.457 1.187,0.683 0.127,1.134 0.3,0.3 1.8,0 0.3,-0.299 0.127,-1.138 1.185,-0.682 1.046,0.458 0.409,-0.11 0.9,-1.559 -0.11,-0.41 -0.92,-0.677 0,-1.366 0.92,-0.677 0.11,-0.41 -0.9,-1.559 -0.409,-0.109 -1.046,0.458 -1.185,-0.682 -0.127,-1.138 -0.3,-0.299 -1.8,0 -0.3,0.3 -0.126,1.135 -1.187,0.682 -1.043,-0.457 -0.41,0.11 -0.899,1.559 0.108,0.409z"},
|
|
1992
1991
|
a);Blockly.utils.dom.createSvgElement(Blockly.utils.Svg.CIRCLE,{"class":"blocklyIconShape",r:"2.7",cx:"8",cy:"8"},a)};Blockly.Mutator.prototype.iconClick_=function(a){this.block_.isEditable()&&Blockly.Icon.prototype.iconClick_.call(this,a)};
|
|
1993
1992
|
Blockly.Mutator.prototype.createEditor_=function(){this.svgDialog_=Blockly.utils.dom.createSvgElement(Blockly.utils.Svg.SVG,{x:Blockly.Bubble.BORDER_WIDTH,y:Blockly.Bubble.BORDER_WIDTH},null);if(this.quarkNames_.length)for(var a=Blockly.utils.xml.createElement("xml"),b=0,c;c=this.quarkNames_[b];b++){var d=Blockly.utils.xml.createElement("block");d.setAttribute("type",c);a.appendChild(d)}else a=null;b=new Blockly.Options({disable:!1,parentWorkspace:this.block_.workspace,media:this.block_.workspace.options.pathToMedia,
|
|
@@ -2320,7 +2319,7 @@ Blockly.FieldDropdown.IMAGE_Y_OFFSET=5;Blockly.FieldDropdown.IMAGE_Y_PADDING=2*B
|
|
|
2320
2319
|
Blockly.FieldDropdown.prototype.initView=function(){this.shouldAddBorderRect_()?this.createBorderRect_():this.clickTarget_=this.sourceBlock_.getSvgRoot();this.createTextElement_();this.imageElement_=Blockly.utils.dom.createSvgElement(Blockly.utils.Svg.IMAGE,{},this.fieldGroup_);this.getConstants().FIELD_DROPDOWN_SVG_ARROW?this.createSVGArrow_():this.createTextArrow_();this.borderRect_&&Blockly.utils.dom.addClass(this.borderRect_,"blocklyDropdownRect")};
|
|
2321
2320
|
Blockly.FieldDropdown.prototype.shouldAddBorderRect_=function(){return!this.getConstants().FIELD_DROPDOWN_NO_BORDER_RECT_SHADOW||this.getConstants().FIELD_DROPDOWN_NO_BORDER_RECT_SHADOW&&!this.sourceBlock_.isShadow()};
|
|
2322
2321
|
Blockly.FieldDropdown.prototype.createTextArrow_=function(){this.arrow_=Blockly.utils.dom.createSvgElement(Blockly.utils.Svg.TSPAN,{},this.textElement_);this.arrow_.appendChild(document.createTextNode(this.sourceBlock_.RTL?Blockly.FieldDropdown.ARROW_CHAR+" ":" "+Blockly.FieldDropdown.ARROW_CHAR));this.sourceBlock_.RTL?this.textElement_.insertBefore(this.arrow_,this.textContent_):this.textElement_.appendChild(this.arrow_)};
|
|
2323
|
-
Blockly.FieldDropdown.prototype.createSVGArrow_=function(){var a=Blockly.utils.userAgent.IE||Blockly.utils.userAgent.IOS,b=a?"image":"use";a=a?this.getConstants().FIELD_DROPDOWN_SVG_ARROW_DATAURI:"#"+(this.
|
|
2322
|
+
Blockly.FieldDropdown.prototype.createSVGArrow_=function(){var a=Blockly.utils.userAgent.IE||Blockly.utils.userAgent.IOS,b=a?"image":"use";a=a?this.getConstants().FIELD_DROPDOWN_SVG_ARROW_DATAURI:"#"+(this.getConstants().dropdownArrowImageId||"blocklyDropdownArrowSvg");this.svgArrow_=Blockly.utils.dom.createSvgElement(b,{height:this.getConstants().FIELD_DROPDOWN_SVG_ARROW_SIZE+"px",width:this.getConstants().FIELD_DROPDOWN_SVG_ARROW_SIZE+"px"},this.fieldGroup_);this.svgArrow_.setAttributeNS(Blockly.utils.dom.XLINK_NS,
|
|
2324
2323
|
"xlink:href",a)};
|
|
2325
2324
|
Blockly.FieldDropdown.prototype.showEditor_=function(a){this.dropdownCreate_();this.menu_.openingCoords=a&&"number"===typeof a.clientX?new Blockly.utils.Coordinate(a.clientX,a.clientY):null;this.menu_.render(Blockly.DropDownDiv.getContentDiv());a=this.menu_.getElement();Blockly.utils.dom.addClass(a,"blocklyDropdownMenu");if(this.getConstants().FIELD_DROPDOWN_COLOURED_DIV){a=this.sourceBlock_.isShadow()?this.sourceBlock_.getParent().getColour():this.sourceBlock_.getColour();var b=this.sourceBlock_.isShadow()?
|
|
2326
2325
|
this.sourceBlock_.getParent().style.colourTertiary:this.sourceBlock_.style.colourTertiary;Blockly.DropDownDiv.setColour(a,b)}Blockly.DropDownDiv.showPositionedByField(this,this.dropdownDispose_.bind(this));this.menu_.focus();this.selectedMenuItem_&&this.menu_.setHighlighted(this.selectedMenuItem_);this.applyColour()};
|
|
@@ -2380,10 +2379,10 @@ Blockly.FieldImage.prototype.showEditor_=function(){this.clickHandler_&&this.cli
|
|
|
2380
2379
|
*/
|
|
2381
2380
|
Blockly.FieldTextDropdown=function(a,b,c,d){this.menuGenerator_=b;Blockly.FieldDropdown.prototype.trimOptions_.call(this);Blockly.FieldTextDropdown.superClass_.constructor.call(this,a,c,d);this.addArgType("textdropdown")};Blockly.utils.object.inherits(Blockly.FieldTextDropdown,Blockly.FieldTextInput);Blockly.FieldTextDropdown.fromJson=function(a){var b=new Blockly.FieldTextDropdown(a.text,a.options);"boolean"==typeof a.spellcheck&&b.setSpellcheck(a.spellcheck);return b};
|
|
2382
2381
|
Blockly.FieldTextDropdown.DROPDOWN_SVG_DATAURI="data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMi43MSIgaGVpZ2h0PSI4Ljc5IiB2aWV3Qm94PSIwIDAgMTIuNzEgOC43OSI+PHRpdGxlPmRyb3Bkb3duLWFycm93PC90aXRsZT48ZyBvcGFjaXR5PSIwLjEiPjxwYXRoIGQ9Ik0xMi43MSwyLjQ0QTIuNDEsMi40MSwwLDAsMSwxMiw0LjE2TDguMDgsOC4wOGEyLjQ1LDIuNDUsMCwwLDEtMy40NSwwTDAuNzIsNC4xNkEyLjQyLDIuNDIsMCwwLDEsMCwyLjQ0LDIuNDgsMi40OCwwLDAsMSwuNzEuNzFDMSwwLjQ3LDEuNDMsMCw2LjM2LDBTMTEuNzUsMC40NiwxMiwuNzFBMi40NCwyLjQ0LDAsMCwxLDEyLjcxLDIuNDRaIiBmaWxsPSIjMjMxZjIwIi8+PC9nPjxwYXRoIGQ9Ik02LjM2LDcuNzlhMS40MywxLjQzLDAsMCwxLTEtLjQyTDEuNDIsMy40NWExLjQ0LDEuNDQsMCwwLDEsMC0yYzAuNTYtLjU2LDkuMzEtMC41Niw5Ljg3LDBhMS40NCwxLjQ0LDAsMCwxLDAsMkw3LjM3LDcuMzdBMS40MywxLjQzLDAsMCwxLDYuMzYsNy43OVoiIGZpbGw9IiM1NzVFNzUiLz48L3N2Zz4K";
|
|
2383
|
-
Blockly.FieldTextDropdown.prototype.initView=function(){Blockly.FieldTextDropdown.superClass_.initView.call(this);this.createSVGArrow_()};Blockly.FieldTextDropdown.prototype.updateSize_=function(){Blockly.FieldTextDropdown.superClass_.updateSize_.call(this);var a=this.positionSVGArrow_(this.size_.width,this.size_.height/2-this.
|
|
2382
|
+
Blockly.FieldTextDropdown.prototype.initView=function(){Blockly.FieldTextDropdown.superClass_.initView.call(this);this.createSVGArrow_()};Blockly.FieldTextDropdown.prototype.updateSize_=function(){Blockly.FieldTextDropdown.superClass_.updateSize_.call(this);var a=this.positionSVGArrow_(this.size_.width,this.size_.height/2-this.getConstants().FIELD_DROPDOWN_SVG_ARROW_SIZE/2);this.size_.width+=a};
|
|
2384
2383
|
Blockly.FieldTextDropdown.prototype.dispose=function(){this.mouseUpWrapper_&&(Blockly.unbindEvent_(this.mouseUpWrapper_),this.mouseUpWrapper_=null,Blockly.Touch.clearTouchIdentifier());Blockly.FieldTextDropdown.superClass_.dispose.call(this)};
|
|
2385
2384
|
Blockly.FieldTextDropdown.prototype.showEditor_=function(a){Blockly.FieldTextDropdown.superClass_.showEditor_.call(this,a,!1,Blockly.utils.userAgent.MOBILE||Blockly.utils.userAgent.ANDROID||Blockly.utils.userAgent.IPAD,!0,function(){this.dropDownOpen_||this.showDropdown_();Blockly.Touch.clearTouchIdentifier()})};Blockly.FieldTextDropdown.prototype.isOptionListDynamic=Blockly.FieldDropdown.prototype.isOptionListDynamic;Blockly.FieldTextDropdown.prototype.getOptions=Blockly.FieldDropdown.prototype.getOptions;
|
|
2386
|
-
Blockly.FieldTextDropdown.prototype.createSVGArrow_=function(){this.svgArrow_=Blockly.utils.dom.createSvgElement("image",{height:this.
|
|
2385
|
+
Blockly.FieldTextDropdown.prototype.createSVGArrow_=function(){this.svgArrow_=Blockly.utils.dom.createSvgElement("image",{height:this.getConstants().FIELD_DROPDOWN_SVG_ARROW_SIZE+"px",width:this.getConstants().FIELD_DROPDOWN_SVG_ARROW_SIZE+"px"},this.fieldGroup_);this.svgArrow_.setAttributeNS(Blockly.utils.dom.XLINK_NS,"xlink:href",Blockly.FieldTextDropdown.DROPDOWN_SVG_DATAURI)};Blockly.FieldTextDropdown.prototype.showDropdown_=Blockly.FieldDropdown.prototype.showEditor_;
|
|
2387
2386
|
Blockly.FieldTextDropdown.prototype.dropdownCreate_=Blockly.FieldDropdown.prototype.dropdownCreate_;Blockly.FieldTextDropdown.prototype.dropdownDispose_=Blockly.FieldDropdown.prototype.dropdownDispose_;Blockly.FieldTextDropdown.prototype.positionSVGArrow_=Blockly.FieldDropdown.prototype.positionSVGArrow_;Blockly.FieldTextDropdown.prototype.handleMenuActionEvent_=Blockly.FieldDropdown.prototype.handleMenuActionEvent_;
|
|
2388
2387
|
Blockly.FieldTextDropdown.prototype.onItemSelected_=function(a,b){a=b.getValue();null!==a&&(this.setValue(a),Blockly.WidgetDiv.hideIfOwner(this))};Blockly.fieldRegistry.register("field_textdropdown",Blockly.FieldTextDropdown);Blockly.FieldMultilineInput=function(a,b,c){Blockly.FieldMultilineInput.superClass_.constructor.call(this,a,b,c);this.textGroup_=null;this.maxLines_=Infinity;this.isOverflowedY_=!1};Blockly.utils.object.inherits(Blockly.FieldMultilineInput,Blockly.FieldTextInput);Blockly.FieldMultilineInput.prototype.configure_=function(a){Blockly.FieldMultilineInput.superClass_.configure_.call(this,a);a.maxLines&&this.setMaxLines(a.maxLines)};
|
|
2389
2388
|
Blockly.FieldMultilineInput.fromJson=function(a){var b=Blockly.utils.replaceMessageReferences(a.text);return new Blockly.FieldMultilineInput(b,void 0,a)};Blockly.FieldMultilineInput.prototype.toXml=function(a){a.textContent=this.getValue().replace(/\n/g," ");return a};Blockly.FieldMultilineInput.prototype.fromXml=function(a){this.setValue(a.textContent.replace(/ /g,"\n"))};
|
|
@@ -2450,7 +2449,7 @@ function(a){a=d.getVariable(a,e);c.setValue(a.getId())},e);return}}this.setValue
|
|
|
2450
2449
|
limitations under the License.
|
|
2451
2450
|
*/
|
|
2452
2451
|
Blockly.FieldVerticalSeparator=function(){Blockly.FieldVerticalSeparator.superClass_.constructor.call(this)};Blockly.utils.object.inherits(Blockly.FieldVerticalSeparator,Blockly.Field);Blockly.FieldVerticalSeparator.fromJson=function(a){return new Blockly.FieldVerticalSeparator};Blockly.FieldVerticalSeparator.prototype.EDITABLE=!1;
|
|
2453
|
-
Blockly.FieldVerticalSeparator.prototype.initView=function(){var a=this.
|
|
2452
|
+
Blockly.FieldVerticalSeparator.prototype.initView=function(){var a=this.getConstants().ICON_SEPARATOR_HEIGHT;this.lineElement_=Blockly.utils.dom.createSvgElement("line",{stroke:this.sourceBlock_.style.colourSecondary,"stroke-linecap":"round",x1:0,y1:0,x2:0,y2:a},this.fieldGroup_);this.size_=new Blockly.utils.Size(1,a);this.sourceBlock_.getSvgRoot().appendChild(this.fieldGroup_)};Blockly.FieldVerticalSeparator.prototype.setLineHeight=function(a){this.lineElement_.setAttribute("y2",a)};
|
|
2454
2453
|
Blockly.FieldVerticalSeparator.prototype.dispose=function(){Blockly.utils.dom.removeNode(this.fieldGroup_);this.lineElement_=this.fieldGroup_=null};Blockly.FieldVerticalSeparator.prototype.getValue=function(){return null};Blockly.FieldVerticalSeparator.prototype.setValue=function(a){};Blockly.FieldVerticalSeparator.prototype.setText=function(a){};Blockly.FieldVerticalSeparator.prototype.render_=function(){};Blockly.FieldVerticalSeparator.prototype.updateWidth=function(){};
|
|
2455
2454
|
Blockly.fieldRegistry.register("field_vertical_separator",Blockly.FieldVerticalSeparator);Blockly.FieldSlider=function(a,b,c,d,e,f,g){Blockly.FieldSlider.superClass_.constructor.call(this,a,null,null,null,g);this.setConstraints(b,c,d);this.step_=parseFloat(e)||void 0;this.labelText_=f};Blockly.utils.object.inherits(Blockly.FieldSlider,Blockly.FieldNumber);Blockly.FieldSlider.prototype.min_=null;Blockly.FieldSlider.prototype.max_=null;Blockly.FieldSlider.prototype.step_=null;Blockly.FieldSlider.prototype.precision_=null;Blockly.FieldSlider.prototype.labelText_=null;
|
|
2456
2455
|
Blockly.FieldSlider.fromJson=function(a){return new Blockly.FieldSlider(a.value,a.min,a.max,a.precision,a.step,a.labelText)};Blockly.FieldSlider.prototype.setOptions=function(a,b,c,d){this.setConstraints(a,b,d);this.step_=parseFloat(c)||void 0;a=this.getNumRestrictor(this.min_,this.max_,this.precision_);this.setRestrictor(a)};Blockly.FieldSlider.prototype.setLabel=function(a){void 0!=a&&(this.labelText_=a)};Blockly.FieldSlider.prototype.setColor=function(a){void 0!=a&&(this.sliderColor_=a)};
|