mirror of
https://github.com/scratchfoundation/scratch-blocks.git
synced 2025-08-28 22:10:31 -04:00
Add comments and CSS style for field refactor
This commit is contained in:
parent
8c180f0c52
commit
2fc35e5797
3 changed files with 3 additions and 2 deletions
|
@ -299,7 +299,7 @@ Blockly.Css.CONTENT = [
|
||||||
'height: 100%;',
|
'height: 100%;',
|
||||||
'margin: 0;',
|
'margin: 0;',
|
||||||
'outline: none;',
|
'outline: none;',
|
||||||
'padding: 2px 0px;',
|
'padding: 2px 0;',
|
||||||
'width: 100%;',
|
'width: 100%;',
|
||||||
'text-align: center;',
|
'text-align: center;',
|
||||||
'}',
|
'}',
|
||||||
|
|
|
@ -305,6 +305,7 @@ Blockly.Field.prototype.getSize = function() {
|
||||||
*/
|
*/
|
||||||
Blockly.Field.prototype.getScaledBBox_ = function() {
|
Blockly.Field.prototype.getScaledBBox_ = function() {
|
||||||
var size = this.getSize();
|
var size = this.getSize();
|
||||||
|
// Create new object, so as to not return an uneditable SVGRect in IE.
|
||||||
return new goog.math.Size(size.width * this.sourceBlock_.workspace.scale,
|
return new goog.math.Size(size.width * this.sourceBlock_.workspace.scale,
|
||||||
size.height * this.sourceBlock_.workspace.scale);
|
size.height * this.sourceBlock_.workspace.scale);
|
||||||
};
|
};
|
||||||
|
|
|
@ -70,7 +70,7 @@ Blockly.FieldColour.prototype.columns_ = 0;
|
||||||
*/
|
*/
|
||||||
Blockly.FieldColour.prototype.init = function(block) {
|
Blockly.FieldColour.prototype.init = function(block) {
|
||||||
Blockly.FieldColour.superClass_.init.call(this, block);
|
Blockly.FieldColour.superClass_.init.call(this, block);
|
||||||
// XXX: borderRect_ has been removed from the field.
|
// TODO(#163): borderRect_ has been removed from the field.
|
||||||
// When fixing field_colour, we should re-color the shadow block instead,
|
// When fixing field_colour, we should re-color the shadow block instead,
|
||||||
// or re-implement a rectangle in the field.
|
// or re-implement a rectangle in the field.
|
||||||
if (this.borderRect_) {
|
if (this.borderRect_) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue