mirror of
https://github.com/google/blockly.git
synced 2026-01-08 17:40:09 +01:00
Don't allow snapping to grid with 0 spacing.
This commit is contained in:
@@ -157,7 +157,7 @@ Blockly.parseOptions_ = function(options) {
|
||||
} else {
|
||||
grid['length'] = parseFloat(grid['length']);
|
||||
}
|
||||
grid['snap'] = !!grid['snap'];
|
||||
grid['snap'] = grid['spacing'] > 0 && !!grid['snap'];
|
||||
var pathToMedia = 'https://blockly-demo.appspot.com/static/media/';
|
||||
if (options['media']) {
|
||||
pathToMedia = options['media'];
|
||||
|
||||
Reference in New Issue
Block a user