diff --git a/src/core/util.ts b/src/core/util.ts index d4c284a7e..9100c7f39 100644 --- a/src/core/util.ts +++ b/src/core/util.ts @@ -65,7 +65,7 @@ export function logError(...args: any[]) { /** * Those data types can be cloned: * Plain object, Array, TypedArray, number, string, null, undefined. - * Those data types will be assgined using the orginal data: + * Those data types will be assigned using the original data: * BUILTIN_OBJECT * Instance of user defined class will be cloned to a plain object, without * properties in prototype. @@ -626,8 +626,8 @@ export function assert(condition: any, message?: string) { } /** - * @param str string to be trimed - * @return trimed string + * @param str string to be trimmed + * @return trimmed string */ export function trim(str: string): string { if (str == null) { @@ -717,7 +717,7 @@ export class HashMap { constructor(obj?: HashMap | { [key in KEY]?: T } | KEY[]) { const isArr = isArray(obj); // Key should not be set on this, otherwise - // methods get/set/... may be overrided. + // methods get/set/... may be overridden. this.data = maybeNativeMap(); const thisMap = this; diff --git a/src/dom/HandlerProxy.ts b/src/dom/HandlerProxy.ts index 2fb792602..87aee89ba 100644 --- a/src/dom/HandlerProxy.ts +++ b/src/dom/HandlerProxy.ts @@ -152,7 +152,7 @@ function isLocalEl(instance: HandlerDomProxy, el: Node) { /** * Make a fake event but not change the original event, - * becuase the global event probably be used by other + * because the global event probably be used by other * listeners not belonging to zrender. * @class */ @@ -259,8 +259,8 @@ const localDOMHandlers: DomHandlersMap = { mousewheel(event: ZRRawEvent) { // IE8- and some other lagacy agent do not support event `wheel`, so we still listen // to the legacy event `mouseevent`. - // Typically if event `wheel` is suppored and the handler has been mounted on a - // DOM element, the lagecy `mousewheel` event will not be triggered (Chrome and Safari). + // Typically if event `wheel` is supported and the handler has been mounted on a + // DOM element, the legacy `mousewheel` event will not be triggered (Chrome and Safari). // But we still do this guard to avoid to duplicated handle. if (wheelEventSupported) { return; @@ -337,7 +337,7 @@ const localDOMHandlers: DomHandlersMap = { // FIXME // pointermove is so sensitive that it always triggered when // tap(click) on touch screen, which affect some judgement in - // upper application. So, we dont support mousemove on MS touch + // upper application. So, we don't support mousemove on MS touch // device yet. if (!isPointerFromTouch(event)) { localDOMHandlers.mousemove.call(this, event); @@ -385,7 +385,7 @@ const globalDOMHandlers: DomHandlersMap = { // FIXME // pointermove is so sensitive that it always triggered when // tap(click) on touch screen, which affect some judgement in - // upper application. So, we dont support mousemove on MS touch + // upper application. So, we don't support mousemove on MS touch // device yet. if (!isPointerFromTouch(event)) { globalDOMHandlers.mousemove.call(this, event); @@ -441,7 +441,7 @@ function mountLocalDOMEventListeners(instance: HandlerDomProxy, scope: DOMHandle // touch screen. And we only support click behavior on MS touch screen now. // MS Gesture Event is only supported on IE11+/Edge and on Windows 8+. - // We dont support touch on IE on win7. + // We don't support touch on IE on win7. // See // if (typeof MSGesture === 'function') { // (this._msGesture = new MSGesture()).target = dom; // jshint ignore:line @@ -540,7 +540,7 @@ class DOMHandlerScope { domTarget: HTMLElement | HTMLDocument domHandlers: DomHandlersMap - // Key: eventName, value: mounted handler funcitons. + // Key: eventName, value: mounted handler functions. // Used for unmount. mounted: Dictionary = {};