mirror of
https://github.com/scratchfoundation/scratch-blocks.git
synced 2025-08-28 22:10:31 -04:00
Merge pull request #1382 from ivanixgames/fix1381a
Fix behavior of color picker on sensor blocks
This commit is contained in:
commit
7c61985d31
2 changed files with 4 additions and 1 deletions
|
@ -834,7 +834,7 @@ Blockly.Css.CONTENT = [
|
|||
'.blocklyDropDownDiv .goog-slider-horizontal .goog-slider-thumb {',
|
||||
'width: 26px;',
|
||||
'height: 26px;',
|
||||
'margin-top: -1px;',
|
||||
'top: -1px;',
|
||||
'position: absolute;',
|
||||
'background-color: white;',
|
||||
'border-radius: 100%;',
|
||||
|
|
|
@ -288,6 +288,7 @@ Blockly.FieldColourSlider.prototype.showEditor_ = function() {
|
|||
this.hueSlider_.setUnitIncrement(5);
|
||||
this.hueSlider_.setMinimum(0);
|
||||
this.hueSlider_.setMaximum(360);
|
||||
this.hueSlider_.setMoveToPointEnabled(true);
|
||||
this.hueSlider_.render(div);
|
||||
|
||||
var saturationElements = this.createLabelDom_(
|
||||
|
@ -296,6 +297,7 @@ Blockly.FieldColourSlider.prototype.showEditor_ = function() {
|
|||
div.appendChild(saturationElements[0]);
|
||||
this.saturationReadout_ = saturationElements[1];
|
||||
this.saturationSlider_ = new goog.ui.Slider();
|
||||
this.saturationSlider_.setMoveToPointEnabled(true);
|
||||
this.saturationSlider_.setUnitIncrement(0.01);
|
||||
this.saturationSlider_.setStep(0.001);
|
||||
this.saturationSlider_.setMinimum(0);
|
||||
|
@ -311,6 +313,7 @@ Blockly.FieldColourSlider.prototype.showEditor_ = function() {
|
|||
this.brightnessSlider_.setUnitIncrement(2);
|
||||
this.brightnessSlider_.setMinimum(0);
|
||||
this.brightnessSlider_.setMaximum(255);
|
||||
this.brightnessSlider_.setMoveToPointEnabled(true);
|
||||
this.brightnessSlider_.render(div);
|
||||
|
||||
Blockly.FieldColourSlider.hueChangeEventKey_ = goog.events.listen(this.hueSlider_,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue