-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Closed
Labels
component: fieldscomponent: renderinghelp wantedExternal contributions actively solicitedExternal contributions actively solicitedissue: bugDescribes why the code or behaviour is wrongDescribes why the code or behaviour is wrongtype: cleanup
Description
Problem statement
We allow angle pickers to work in both protractor and compass mode, but whatever mode is picked applies to all angle pickers on the screen.
/* The following two settings work together to set the behaviour of the angle
* picker. While many combinations are possible, two modes are typical:
* Math mode.
* 0 deg is right, 90 is up. This is the style used by protractors.
* Blockly.FieldAngle.CLOCKWISE = false;
* Blockly.FieldAngle.OFFSET = 0;
* Compass mode.
* 0 deg is up, 90 is right. This is the style used by maps.
* Blockly.FieldAngle.CLOCKWISE = true;
* Blockly.FieldAngle.OFFSET = 90;
*/
/**
* Angle increases clockwise (true) or counterclockwise (false).
*/
Blockly.FieldAngle.CLOCKWISE = false;
/**
* Offset the location of 0 degrees (and all angles) by a constant.
* Usually either 0 (0 = right) or 90 (0 = up).
*/
Blockly.FieldAngle.OFFSET = 0;
Expected Behavior
You can pick on a per-field basis.
Additional Information
Blockly's angle picker doesn't have labels to help orient the user, so it might be confusing to allow these to mix. But if we upgrade the rendering, we may also want to change these properties.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
component: fieldscomponent: renderinghelp wantedExternal contributions actively solicitedExternal contributions actively solicitedissue: bugDescribes why the code or behaviour is wrongDescribes why the code or behaviour is wrongtype: cleanup