Skip to content

Commit acfb3e6

Browse files
committed
fix: some silly issues and a rename
1 parent c44cb57 commit acfb3e6

File tree

4 files changed

+4
-8
lines changed

4 files changed

+4
-8
lines changed

core/block_render_svg_horizontal.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -551,11 +551,7 @@ Blockly.BlockSvg.prototype.renderDraw_ = function(metrics) {
551551
if (this.RTL) {
552552
// Mirror the block's path.
553553
// This is awesome.
554-
if (Blockly.useCatBlocks) {
555-
this.svgPathBody_.setAttribute('transform', 'scale(-1 1)');
556-
} else {
557-
this.svgPath_.setAttribute('transform', 'scale(-1 1)');
558-
}
554+
this.blockFrameElement_.setAttribute('transform', 'scale(-1 1)');
559555
}
560556

561557
// Horizontal blocks have a single Image Field that is specially positioned

core/block_render_svg_vertical.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1158,7 +1158,7 @@ Blockly.BlockSvg.prototype.computeOutputPadding_ = function(inputRows) {
11581158
// Or would just that complicate unforking?
11591159
Blockly.BlockSvg.prototype.renderCatFace_ = function() {
11601160
// This only makes sense in the context of the Cat Blocks theme.
1161-
if (this.theme !== Blockly.Themes.CAT_BLOCKS) {
1161+
if (Blockly.theme !== Blockly.Themes.CAT_BLOCKS) {
11621162
return;
11631163
}
11641164

core/block_svg.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ Blockly.BlockSvg.prototype.unselect = function() {
254254
};
255255

256256
Blockly.BlockSvg.prototype.initCatStuff = function() {
257-
if (this.theme !== Blockly.Themes.CAT_BLOCKS || this.hasInitCatStuff) {
257+
if (Blockly.theme !== Blockly.Themes.CAT_BLOCKS || this.hasInitCatStuff) {
258258
return;
259259
}
260260
// TODO: Test what happens if we turn on and off Cat Blocks several times

core/blockly.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ Object.defineProperty(Blockly, 'theme', {
196196
}
197197
});
198198

199-
Blockly.switchTheme = function(theme) {
199+
Blockly.setTheme = function(theme) {
200200
if (theme === Blockly.Themes.CAT_BLOCKS) {
201201
Blockly.theme_ = theme;
202202
} else {

0 commit comments

Comments
 (0)