Code correction from previous commit. Moved style to css.js and set ROUNDING=15;

This commit is contained in:
Karan Purohit
2017-02-15 14:33:20 +05:30
parent cdef092683
commit 4a81623f8d
2 changed files with 6 additions and 5 deletions

View File

@@ -397,7 +397,7 @@ Blockly.Css.CONTENT = [
'.blocklyFlyoutScrollbar {',
'z-index: 30;',
'}',
'.blocklyScrollbarHorizontal, .blocklyScrollbarVertical {',
'position: absolute;',
'outline: none;',
@@ -464,6 +464,7 @@ Blockly.Css.CONTENT = [
'stroke: #f00;',
'stroke-width: 2;',
'stroke-linecap: round;',
'pointer-events: none;',
'}',
'.blocklyContextMenu {',

View File

@@ -57,7 +57,7 @@ goog.inherits(Blockly.FieldAngle, Blockly.FieldTextInput);
* Round angles to the nearest 15 degrees when using mouse.
* Set to 0 to disable rounding.
*/
Blockly.FieldAngle.ROUND = 1;
Blockly.FieldAngle.ROUND = 15;
/**
* Half the width of protractor image.
@@ -152,11 +152,11 @@ Blockly.FieldAngle.prototype.showEditor_ = function() {
}, svg);
this.gauge_ = Blockly.utils.createSvgElement('path',
{'class': 'blocklyAngleGauge'}, svg);
this.line_ = Blockly.utils.createSvgElement('line',
{'x1': Blockly.FieldAngle.HALF,
this.line_ = Blockly.utils.createSvgElement('line',{
'x1': Blockly.FieldAngle.HALF,
'y1': Blockly.FieldAngle.HALF,
'class': 'blocklyAngleLine',
'style': 'pointer-events: none;'}, svg);
}, svg);
// Draw markers around the edge.
for (var angle = 0; angle < 360; angle += 15) {
Blockly.utils.createSvgElement('line', {