Neil Fraser
1a470003fe
fix: Stop throwing error when PointerEvent.pageX is 0. ( #5727 )
...
The e.pageX (and .pageY) checks aren't strict enough. 0 is a perfectly valid coordinate.
Checking for the existence of changedTouches is an easier way to distinguish a PointerEvent from a TouchEvent.
2021-11-26 10:27:43 -08:00
Aaron Dodson
3851b14627
refactor: Migrate to named exports ( #5623 )
...
* refactor: Migrate to named exports
* fix: Sort requires
* fix: Remove duplicate deps
2021-10-20 15:53:23 -07:00
Neil Fraser
90b3f75d82
Remove @author tags ( #5601 )
...
Our files are up to a decade old, and have churned so much, that the initial author of the file no longer has much meaning.
Furthermore, this will encourage developers to post to the developer group, rather than emailing Googlers (usually me) directly.
2021-10-15 09:50:46 -07:00
Neil Fraser
c929b3015b
chore: Convert == to === and != to !== where possible. ( #5599 )
2021-10-15 09:17:04 -07:00
Monica Kozbial
49bc2b1ae4
Replace namespace annotation with class annotation in files that define a class ( #5566 )
2021-09-28 15:57:09 -07:00
Monica Kozbial
d8fbe1b05b
Add namespace and alias annotations to jsdoc ( #5550 )
...
* Add annotations to files under core/events
* Add annotations to files under core/interfaces
* Add annotations to files under core/keyboard_nav
* Add annotations to files under core/renderers
* Add annotations to files under core/serialization
* Add annotations to files under core/theme
* Add annotations to files under core/toolbox
* Add annotations to files under core/utils
* Add annotations to files under core
2021-09-27 14:42:54 -07:00
Aaron Dodson
e0693a65d2
chore: Remove declareLegacyNamespace() from files in core ( #5525 )
...
* chore: Remove declareLegacyNamespace() from files in core
* fix: Update missing/errant re-exports in blockly.js
2021-09-23 14:48:52 -07:00
Beka Westberg
f77526e558
Move browser event utils from utils.js to browser_events.js ( #5464 )
...
* fix: move browser event utils to browserEvents
* fix: mark browser event utils in utils as deprecated
* fix: move uses of browser event funcs to browserEvents
* fix: remove browserEvents definition of noEvent
* fix: add renames for browser event utils
* docs: add suggested alternatives for browser event utils
* fix: change deprecations to stubs
* fix: PR comments
2021-09-17 14:49:01 -07:00
Aaron Dodson
53061ac6e5
Migrate core/touch_gesture.js to goog.module syntax ( #5449 )
...
* Migrate core/touch_gesture.js to ES6 const/let
* Migrate core/touch_gesture.js to goog.module
* Migrate core/touch_gesture.js to named requires
* clang-format core/touch_gesture.js
* Remove Blockly prefix from Touch
2021-09-09 14:19:32 -07:00
kozbial
9561cb20c9
Migrate core/touch.js to goog.module
2021-08-17 14:42:31 -07:00
Neil Fraser
e661c92a36
More JSDoc improvements
2021-05-27 21:30:26 -07:00
Rachel Fenichel
1d8c234d33
Update uses of bindEvent_, bindEventWithChecks_, and unbindEvent_. Add missing requires for Blockly.browserEvents.
2021-02-23 11:23:28 -08:00
Rachel Fenichel
54c4e8de39
Rename Blockly.eventHandling->Blockly.browserEvents and replace all Blockly.EventData annotations
2021-02-22 13:23:19 -08:00
Rachel Fenichel
107181d6f5
Missing requires, r through v
2021-02-17 14:52:06 -08:00
Neil Fraser
4e2f8e6e02
Use SPDX licences.
...
This is a followup to #3127 .
At the time, SPDX licenses were pending approval by Google.
2020-02-11 13:27:20 -08:00
Beka Westberg
dad8738e75
Cleaned up unbindEvent_ calls ( #3429 )
...
* Cleaned up unbindEvent_ calls.
2019-11-12 10:14:31 -08:00
Sam El-Husseini
cbc79444f6
Fix touch gesture code ( #3351 )
2019-10-28 12:11:35 -07:00
Monica Kozbial
17af987de0
Adding pinch zoom config option. ( #3317 )
...
* Adding pinch zoom config option.
2019-10-25 16:45:55 -07:00
Sam El-Husseini
270781113d
Fix warnings related to gestures and drag. ( #3307 )
...
* Fix warnings related to gestures and drag.
2019-10-22 14:21:00 -04:00
Neil Fraser
b46a4fe286
Bring our license format up to date ( #3127 )
...
* Google changed from an Inc to an LLC.
This happened back in 2017 but we didn’t notice. Officially we should update files from Inc to LLC when they are changed as part of regular edits, but this is a nightmare to remember for the next decade.
* Remove project description/titles from licenses
This is no longer part of Google’s header requirements. Our existing descriptions were useless (“Visual Blocks Editor”) or grossly obselete (“Visual Blocks Language”).
* License no longer requires URL.
* Fix license regexps.
2019-10-02 14:46:56 -07:00
Rachel Fenichel
269f0dc381
Enable eslint rule spaced-comment
...
Fix up all remaining violations and turn the rule on.
2019-09-25 16:04:05 -07:00
Sam El-Husseini
8ab51c8639
Remove closure base file dependency ( #2976 )
...
* Trim down closure's base dependency even further by removing the dependency on closure's base file.
2019-09-11 17:30:51 -07:00
Neil Fraser
a9fdf7844a
Fix ordering of requires
...
Search and replace of a name strikes again.
2019-06-07 10:32:57 -07:00
Neil Fraser
5bf7069a2f
Remove goog.math.Coordinate
2019-06-07 10:32:57 -07:00
Neil Fraser
e9de083361
Fix @return JSDocs.
2019-03-29 15:24:37 -07:00
Neil Fraser
aa09ad9175
Line wrap at 80.
2018-10-16 11:34:10 -07:00
Neil Fraser
284b79407e
Require Blockly.utils where needed.
2018-07-11 12:20:02 -07:00
Neil Fraser
3909bd420a
Remove all goog.asserts and goog.isXxx
...
First step to reducing Closure’s footprint.
2018-07-11 12:20:02 -07:00
Rachel Fenichel
3f77ceb823
Tighten line length rule from 120 to 100
2018-03-19 13:08:47 -07:00
Sam El-Husseini
580ef211d7
Fixed to touch gesture
2018-03-06 11:03:04 -08:00
Sam El-Husseini
6326830e85
Don't handle a touch gesture event if the gesture has been cancelled.
2018-03-05 09:50:38 -08:00
Rachel Fenichel
870219e750
Get rid of the last indentation lint (that is checked by eslint) and turn indentation back to erroring instead of warning.
2018-01-25 17:33:43 -08:00
microsoftsam
4b064da8e8
Support pinch to zoom gesture for both touch and pointer events
2018-01-11 11:26:42 -08:00