Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
yomotsu committed Jan 26, 2023
2 parents fd65fb4 + 65217f0 commit d7995d3
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 12 deletions.
7 changes: 7 additions & 0 deletions dist/EventDispatcher.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ export declare class EventDispatcher {
* @category Methods
*/
addEventListener(type: string, listener: Listener): void;
/**
* Presence of the specified event listener.
* @param type event name
* @param listener handler function
* @category Methods
*/
hasEventListener(type: string, listener: Listener): boolean;
/**
* Removes the specified event listener
* @param type event name
Expand Down
14 changes: 10 additions & 4 deletions dist/camera-controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,16 @@
if (listeners[type].indexOf(listener) === -1)
listeners[type].push(listener);
}
// hasEventListener( type: string, listener: Listener ): boolean {
// const listeners = this._listeners;
// return listeners[ type ] !== undefined && listeners[ type ].indexOf( listener ) !== - 1;
// }
/**
* Presence of the specified event listener.
* @param type event name
* @param listener handler function
* @category Methods
*/
hasEventListener(type, listener) {
const listeners = this._listeners;
return listeners[type] !== undefined && listeners[type].indexOf(listener) !== -1;
}
/**
* Removes the specified event listener
* @param type event name
Expand Down
2 changes: 1 addition & 1 deletion dist/camera-controls.min.js

Large diffs are not rendered by default.

14 changes: 10 additions & 4 deletions dist/camera-controls.module.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,16 @@ class EventDispatcher {
if (listeners[type].indexOf(listener) === -1)
listeners[type].push(listener);
}
// hasEventListener( type: string, listener: Listener ): boolean {
// const listeners = this._listeners;
// return listeners[ type ] !== undefined && listeners[ type ].indexOf( listener ) !== - 1;
// }
/**
* Presence of the specified event listener.
* @param type event name
* @param listener handler function
* @category Methods
*/
hasEventListener(type, listener) {
const listeners = this._listeners;
return listeners[type] !== undefined && listeners[type].indexOf(listener) !== -1;
}
/**
* Removes the specified event listener
* @param type event name
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "camera-controls",
"version": "1.38.0",
"version": "1.38.1",
"author": "Yomotsu",
"license": "MIT",
"main": "dist/camera-controls.js",
Expand Down

0 comments on commit d7995d3

Please sign in to comment.