Skip to content

Commit

Permalink
Merge pull request #1059 from striezel-stash/fix-typos
Browse files Browse the repository at this point in the history
chore: fix a few typos
  • Loading branch information
plainheart authored Jan 29, 2024
2 parents a906563 + d392250 commit 9d845e2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions src/core/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -717,7 +717,7 @@ export class HashMap<T, KEY extends string | number = string | number> {
constructor(obj?: HashMap<T, KEY> | { [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<T, KEY>();
const thisMap = this;

Expand Down
14 changes: 7 additions & 7 deletions src/dom/HandlerProxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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 <https://msdn.microsoft.com/en-us/library/dn433243(v=vs.85).aspx>
// if (typeof MSGesture === 'function') {
// (this._msGesture = new MSGesture()).target = dom; // jshint ignore:line
Expand Down Expand Up @@ -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<EventListener> = {};

Expand Down

0 comments on commit 9d845e2

Please sign in to comment.