Rachel Fenichel
ec027baa5e
Temporary fix for broken text field validation.
2017-01-20 22:07:04 -08:00
picklesrus
25ed815320
Make cursor stay as a closed hand when dragging blocks around in the drag surface. Do this by applying the same style to text elements in the drag surface that we do in the main svg. ( #805 )
2017-01-05 15:39:06 -08:00
Rachel Fenichel
3cd62050a2
Merge pull request #802 from rachel-fenichel/bugfix/field_undo
...
Fix two event bugs on fields
2017-01-05 13:14:20 -08:00
picklesrus
9f3e15cd82
Move createDom call into the constructor of block drag surface. ( #790 )
2017-01-04 17:02:06 -08:00
Rachel Fenichel
12ffc655b8
Merge pull request #803 from rachel-fenichel/bugfix/xml_function_rename
...
Init procedure blocks with empty name, and set default name in xml in…
2017-01-04 13:22:41 -08:00
Rachel Fenichel
158df44a94
Init procedure blocks with empty name, and set default name in xml in Blockly.Procedures.flyoutCategory
2017-01-03 18:41:28 -08:00
Rachel Fenichel
528ea86cbf
Check if the text has changed before firing an event
2017-01-03 14:58:05 -08:00
Rachel Fenichel
056824593e
Now that text input's setText skips setValue, it needs to explicitly create a change event
2017-01-03 14:51:28 -08:00
picklesrus
eb64921da5
Fix #794 and make the workspace grid drag along with the workspace. ( #801 )
...
There was some IE specific code that also applies to Edge so just updated
a conditional to include Edge.
2017-01-03 14:36:31 -08:00
Rachel Fenichel
20cf6abb5f
End event groups when you finish editing a field
2017-01-03 14:09:41 -08:00
picklesrus
91938c3fb8
Use the drag surface when scrolling using the scrollbars. #783 ( #789 )
2017-01-03 10:02:28 -08:00
picklesrus
6aee3ed2da
Fixes #786 by checking if getComputedStyle is null in is3dSupported. We do not cache the value in this case and try again later. is3dSupported is only called while users are interacting with blockly which they cannot do while hidden so the performance implications of running the check again are minimal. ( #787 )
2016-12-16 09:52:19 -08:00
Rachel Fenichel
6b39c7d646
Merge pull request #782 from rachel-fenichel/feature/flyout_disable_resize
...
Disable workspace resizing while loading the flyout from XML
2016-12-15 11:15:39 -08:00
picklesrus
e1cd21842a
Add a workspace drag surface that blocks and bubble get moved to duri… ( #778 )
...
* Add a workspace drag surface that blocks and bubble get moved to during a workspace drag.
The surface is translated using translate3d instead of svg's translate attribute so that
the browser does not have to repaint the entire workspace on every mouse move.
This is very similar to the block drag surface.
* Address code review comments
* add back hasClass_ utility removed in #748 and stop using contains since it is not supported in IE
2016-12-15 11:02:49 -08:00
Rachel Fenichel
f54f229bc2
Disable workspace resizing while loading the flyout from XML
2016-12-14 17:06:09 -08:00
picklesrus
5b6f1debeb
Move the call to disable resize before placeNewBlock so that it is of… ( #777 )
...
* Move the call to disable resize before placeNewBlock so that it is off when workspace resizeContents
gets triggered by placeNewBlock. This fixes a bug in rtl mode where the workspace was being resized
between when the block was added to the workspace and when it was moved to the proper location.
2016-12-14 14:57:32 -08:00
Rachel Fenichel
22b018321c
update generator comments
2016-12-09 22:10:36 -08:00
Rachel Fenichel
33d6f72b29
Merge pull request #650 from trodi/generator-docs
...
Add Generator functions to prototype + JSDoc
2016-12-09 17:46:47 -08:00
picklesrus
a82bd49d7e
Split the scrollbar and flyout out into their own SVG elements. They ( #771 )
...
* Split the scrollbar and flyout out into their own SVG elements. They
are siblings of the workpsace SVG. This paves the way to make performance
improvements to workspace dragging.
2016-12-09 16:19:19 -08:00
Rodrigo Queiro
8384f8fe05
Make zoom speed independent of event granularity
...
Before, touchpads would give "smoother" scrolling by delivering lots of
mousewheel events with small distance changes. Because the code only
looked at the sign of deltaY, ten 5px scrolls would zoom 10x more than
one 50px scroll.
This change makes zooming with a touchpad more like zooming with a
mousewheel. On my laptop, a full-scale zoom (fully out to fully in) was
about a 5mm finger movement before, and is now about 3cm.
Fixes #758 .
2016-12-09 11:12:28 +01:00
Rachel Fenichel
25ca1bccff
Merge pull request #767 from rachel-fenichel/feature/register_button_callbacks_on_workspace
...
Associate flyout button callbacks directly with workspaces
2016-12-08 14:11:18 -08:00
Rachel Fenichel
086fd720b2
Associate flyout button callbacks directly with workspaces
2016-12-08 13:05:19 -08:00
Neil Fraser
5b86b9792d
Don't get Toolbox element unless needed.
2016-12-07 00:22:46 -08:00
Rachel Fenichel
885490b835
Merge pull request #761 from rachel-fenichel/feature/label_classes_2
...
Add classes to labels with web-style attribute in xml
2016-12-05 15:16:57 -08:00
Rachel Fenichel
729c442c31
lint
2016-12-05 15:14:02 -08:00
Neil Fraser
97644fdf04
Improve comments.
2016-12-03 06:34:18 -08:00
Rachel Fenichel
7f4efe4ebe
createSvgElement is now in utils. fix two calls.
2016-12-02 14:12:34 -08:00
Rachel Fenichel
7b783dc30a
change 'class' to 'web-style'
2016-12-02 14:08:50 -08:00
Rachel Fenichel
1bac79791e
console.log -> console.warn
2016-12-02 14:04:02 -08:00
Rachel Fenichel
ff87c76557
Don't make labels clickable
2016-12-02 14:03:49 -08:00
Rachel Fenichel
effc1d5f1c
Add ability to specify a css class for labels and buttons
2016-12-02 14:01:36 -08:00
Neil Fraser
ac0105cb4d
Set the text not the value when closing a text editor.
...
Also rename variables for clarity.
2016-11-24 10:39:13 -08:00
Neil Fraser
065e801a08
When user edits text in a field, set text, not value.
...
Existing text-editable fields don’t care (dropdown care, but are not
text-editable). But a note picker needs to set its value to 60 if text
is set to ‘C4’.
2016-11-24 07:29:39 -08:00
Neil Fraser
a66d274169
Fix broken highlighting when highlighted block is deleted. Issue 752.
2016-11-21 01:18:28 -08:00
Neil Fraser
4cda20dbbf
Fix speling.
2016-11-19 02:40:11 -08:00
Neil Fraser
fbd9276e9c
Lint
2016-11-18 20:26:56 -08:00
Neil Fraser
0e9651ee88
Fix conflict between 'utils' and 'image dropdown' merges.
2016-11-16 17:56:25 -08:00
Neil Fraser
8fba5cd044
Fix selection border on blocks that have been highlighted.
2016-11-15 17:49:51 -08:00
Neil Fraser
c27841f8df
Fix compiler errors.
2016-11-15 16:41:11 -08:00
Andrew n marshall
e5d25bb686
String reference in JSON string messages ( #741 )
...
* Adds message references to message string interpolation, in the form of %{BKY_STRING}.
* Re-adding CONTROLS_IFELSE block using the new syntax, referencing to CONTROL_IF equivalents.
2016-11-15 15:51:51 -08:00
Neil Fraser
f6aef459fc
API-breaking cleanup. But doubtful anyone will be affected. ( #748 )
...
* Make add/removeClass return whether they did anything.
* Move more functions onto utils.
* Move bind functions to Blockly.
* Routine recompile.
2016-11-15 13:54:33 -08:00
picklesrus
7f02c19bfe
Improve performance of block dragging. This is a backport of the blo… ( #732 )
...
Improve performance of block dragging. This is a backport of the block drag surface from scratch-blocks. At the beginning of a block drag, blocks get moved to a drag surface which then translates using translate3d to avoid repainting the entire svg on every mouse move. At the end of the drag, the blocks are dropped back in the svg in their new position.
2016-11-15 13:19:49 -08:00
Rachel Fenichel
1f67654088
Merge pull request #736 from google/fraser-develop
...
Allow images in dropdown menus.
2016-11-15 13:07:46 -08:00
Neil Fraser
594c46785f
Remove obsolete Gecko image hack. Apparently this has been fixed in Gecko.
2016-11-14 17:36:02 -08:00
Rachel Fenichel
b5822e2925
Revert "Revert "Rebuild nov 3 16""
...
This reverts commit c8ca24a000 .
2016-11-11 17:05:13 -08:00
Rachel Fenichel
d04d8280c7
Merge branch 'master' into merge_master_to_develop_nov_11_16
2016-11-11 16:17:53 -08:00
Neil Fraser
32713726dc
Don't split dropdown text if there is an image.
2016-11-11 04:27:54 -08:00
Rachel Fenichel
1e631965c1
Merge pull request #729 from rachel-fenichel/feature/import_definitions
...
Add ability to define blocks with a json array
2016-11-09 13:43:30 -08:00
Rachel Fenichel
26c10fe585
lint
2016-11-09 13:42:58 -08:00
Rachel Fenichel
34a6d5e6e4
simplification
2016-11-09 13:12:18 -08:00