mumuki-gobstones-runner 1.7.3 → 1.7.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/render/editor/editor.html +28 -12
- data/lib/version_hook.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6a364d5ccef801cb9c9b312637ade4d4614b5bed27bad9cc5ba230daa4ce1dfb
|
4
|
+
data.tar.gz: 91aaeaaf2909a98d7f4ab1ab763d8fb18dcfb02ab8b987da9627677d1bc6bae6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d793873934b907142bd8cf0e4603956bffcb839f15f29930250aa303b6df5b6be9abf715614700914fc0865c1dac668b0f0b08d37a1ecd11561a4573a3d8dd52
|
7
|
+
data.tar.gz: 8411ce985b334a186e5eb46324f4a825336d62ed5ddae2fe05caabdbbe4fe396fc37082627ffd4e174f6b5ca8da6dbdd43adf6d0626046e8edc2248f849e54a6
|
@@ -17,7 +17,7 @@
|
|
17
17
|
type: Boolean,
|
18
18
|
value: false
|
19
19
|
},
|
20
|
-
|
20
|
+
teacherMode: {
|
21
21
|
type: Boolean,
|
22
22
|
default: false
|
23
23
|
}
|
@@ -67,10 +67,19 @@
|
|
67
67
|
|
68
68
|
const updateFields = () => {
|
69
69
|
const blockly = this.getBlockly();
|
70
|
+
|
70
71
|
const editorValue = $("#mu-custom-editor-value")[0];
|
71
72
|
if (editorValue) {
|
72
73
|
editorValue.value = blockly.workspaceXml;
|
73
74
|
}
|
75
|
+
|
76
|
+
if (this.teacherMode) {
|
77
|
+
const editorExtra = $("#mu-custom-editor-extra")[0];
|
78
|
+
if (editorExtra) {
|
79
|
+
editorExtra.value = blockly.workspaceXml;
|
80
|
+
}
|
81
|
+
}
|
82
|
+
|
74
83
|
if (typeof angular !== 'undefined') {
|
75
84
|
angular.element(editorValue).triggerHandler("change");
|
76
85
|
}
|
@@ -122,10 +131,9 @@
|
|
122
131
|
this._initializeWorkspace(blockly);
|
123
132
|
|
124
133
|
localOnResize();
|
125
|
-
|
126
134
|
blockly._onresize();
|
127
|
-
|
128
|
-
updateFields
|
135
|
+
|
136
|
+
this._subscribeToWorkspace(blockly, updateFields);
|
129
137
|
}, 50);
|
130
138
|
};
|
131
139
|
|
@@ -176,14 +184,21 @@
|
|
176
184
|
|
177
185
|
_initializeWorkspace: function(blockly) {
|
178
186
|
setTimeout(() => {
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
blockly.
|
185
|
-
|
186
|
-
|
187
|
+
const value = $("#mu-custom-editor-value")[0].value;
|
188
|
+
|
189
|
+
blockly.workspaceXml = value || (
|
190
|
+
this.teacherMode
|
191
|
+
? "<xml></xml>"
|
192
|
+
: blockly.initialXml
|
193
|
+
);
|
194
|
+
blockly.scrollToBlock();
|
195
|
+
});
|
196
|
+
},
|
197
|
+
|
198
|
+
_subscribeToWorkspace: function(blockly, action) {
|
199
|
+
setTimeout(() => {
|
200
|
+
blockly.workspace.addChangeListener(action);
|
201
|
+
action();
|
187
202
|
});
|
188
203
|
}
|
189
204
|
});
|
@@ -273,6 +288,7 @@
|
|
273
288
|
_onButtonClick: function () {
|
274
289
|
const blockly = this._getBlockly();
|
275
290
|
blockly.workspaceXml = blockly.initialXml;
|
291
|
+
blockly.scrollToBlock();
|
276
292
|
},
|
277
293
|
|
278
294
|
_getBlockly: function () {
|
data/lib/version_hook.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mumuki-gobstones-runner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rodrigo Alfonso
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-05-
|
11
|
+
date: 2018-05-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mumukit
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '0.
|
61
|
+
version: '0.16'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '0.
|
68
|
+
version: '0.16'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: gobstones-code-runner
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|