mirror of
https://github.com/scratchfoundation/scratch-blocks.git
synced 2025-08-28 22:10:31 -04:00
Initial SVG rendering modifications.
This commit is contained in:
parent
dc1f03a168
commit
6a708da899
6 changed files with 1952 additions and 78 deletions
File diff suppressed because one or more lines are too long
1893
core/block_horizontal_scratch.js
Normal file
1893
core/block_horizontal_scratch.js
Normal file
File diff suppressed because it is too large
Load diff
|
@ -24,7 +24,7 @@
|
|||
*/
|
||||
'use strict';
|
||||
|
||||
goog.provide('Blockly.BlockSvg');
|
||||
// goog.provide('Blockly.BlockSvg');
|
||||
|
||||
goog.require('Blockly.Block');
|
||||
goog.require('Blockly.ContextMenu');
|
||||
|
|
23
core/css.js
23
core/css.js
|
@ -178,10 +178,9 @@ Blockly.Css.CONTENT = [
|
|||
'stroke-width: 4px;',
|
||||
'}',
|
||||
|
||||
'.blocklyPathLight {',
|
||||
'fill: none;',
|
||||
'stroke-linecap: round;',
|
||||
'stroke-width: 1;',
|
||||
'.blocklyPath {',
|
||||
// 'stroke: #f00;',
|
||||
'stroke-width: 1px;',
|
||||
'}',
|
||||
|
||||
'.blocklySelected>.blocklyPath {',
|
||||
|
@ -189,30 +188,16 @@ Blockly.Css.CONTENT = [
|
|||
'stroke-width: 3px;',
|
||||
'}',
|
||||
|
||||
'.blocklySelected>.blocklyPathLight {',
|
||||
'display: none;',
|
||||
'}',
|
||||
|
||||
'.blocklyDragging>.blocklyPath,',
|
||||
'.blocklyDragging>.blocklyPathLight {',
|
||||
'.blocklyDragging>.blocklyPath {',
|
||||
'fill-opacity: .8;',
|
||||
'stroke-opacity: .8;',
|
||||
'}',
|
||||
|
||||
'.blocklyDragging>.blocklyPathDark {',
|
||||
'display: none;',
|
||||
'}',
|
||||
|
||||
'.blocklyDisabled>.blocklyPath {',
|
||||
'fill-opacity: .5;',
|
||||
'stroke-opacity: .5;',
|
||||
'}',
|
||||
|
||||
'.blocklyDisabled>.blocklyPathLight,',
|
||||
'.blocklyDisabled>.blocklyPathDark {',
|
||||
'display: none;',
|
||||
'}',
|
||||
|
||||
'.blocklyText {',
|
||||
'cursor: default;',
|
||||
'fill: #fff;',
|
||||
|
|
|
@ -119,7 +119,6 @@ Blockly.FieldDropdown.prototype.showEditor_ = function() {
|
|||
}
|
||||
}
|
||||
if (value !== null) {
|
||||
thisField.sourceBlock_.setShadow(false);
|
||||
thisField.setValue(value);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -195,7 +195,6 @@ Blockly.FieldTextInput.prototype.onHtmlInputChange_ = function(e) {
|
|||
// Update source block.
|
||||
var text = htmlInput.value;
|
||||
if (text !== htmlInput.oldValue_) {
|
||||
this.sourceBlock_.setShadow(false);
|
||||
htmlInput.oldValue_ = text;
|
||||
this.setText(text);
|
||||
this.validate_();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue