Skip to content

Commit

Permalink
removed viewport.visible setter
Browse files Browse the repository at this point in the history
  • Loading branch information
davidfig committed May 7, 2021
1 parent 41e0679 commit 47cc021
Show file tree
Hide file tree
Showing 9 changed files with 2,346 additions and 4,377 deletions.
308 changes: 308 additions & 0 deletions docs/index.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/index.js.map

Large diffs are not rendered by default.

5,924 changes: 1,748 additions & 4,176 deletions docs/original/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/original/index.js.map

Large diffs are not rendered by default.

28 changes: 28 additions & 0 deletions docs/sample/rollup.dev.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import resolve from '@rollup/plugin-node-resolve'
import commonjs from '@rollup/plugin-commonjs'
import builtins from '@joseph184/rollup-plugin-node-builtins'
import globals from 'rollup-plugin-node-globals'
import serve from 'rollup-plugin-serve'

export default {
input: 'docs/sample/app.js',
plugins: [
builtins(),
resolve({
preferBuiltins: false,
browser: true
}),
commonjs({
namedExports: {
'resource-loader': ['Resource']
}
}),
globals(),
serve('docs')
],
output: {
file: 'docs/index.js',
format: 'iife',
sourcemap: true
}
}
24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
],
"scripts": {
"start": "serve docs/",
"dev": "rollup -w -c docs/original/rollup.dev.js",
"dev": "rollup -w -c docs/sample/rollup.dev.js",
"test": "floss --path test",
"coverage": "nyc mocha",
"build": "rollup -c && yarn build:types",
Expand Down Expand Up @@ -62,36 +62,36 @@
"penner": "^0.1.3"
},
"devDependencies": {
"@babel/core": "^7.13.16",
"@babel/preset-env": "^7.13.15",
"@babel/core": "^7.14.0",
"@babel/preset-env": "^7.14.1",
"@joseph184/rollup-plugin-node-builtins": "^2.1.4",
"@microsoft/api-extractor": "^7.14.0",
"@microsoft/api-extractor": "^7.15.1",
"@pixi-build-tools/rollup-configurator": "^1.0.14",
"@pixi/display": "^6.0.0",
"@pixi/eslint-config": "^2.0.1",
"@pixi/interaction": "^6.0.0",
"@pixi/math": "^6.0.0",
"@pixi/ticker": "^6.0.0",
"@rollup/plugin-babel": "^5.3.0",
"@rollup/plugin-commonjs": "^18.0.0",
"@rollup/plugin-node-resolve": "^11.2.1",
"@rollup/plugin-commonjs": "^19.0.0",
"@rollup/plugin-node-resolve": "^13.0.0",
"@rollup/plugin-sucrase": "^3.1.0",
"@typescript-eslint/eslint-plugin": "^4.22.0",
"@typescript-eslint/parser": "^4.22.0",
"@typescript-eslint/eslint-plugin": "^4.22.1",
"@typescript-eslint/parser": "^4.22.1",
"browserify": "^17.0.0",
"chai": "^4.3.4",
"clicked": "^4.0.3",
"dom-ease": "^0.9.3",
"electron": "^12.0.5",
"eslint": "^7.24.0",
"electron": "^12.0.7",
"eslint": "^7.25.0",
"floss": "^5.0.0",
"fork-me-github": "^1.2.0",
"fs-extra": "^9.1.0",
"fs-extra": "^10.0.0",
"jsdoc": "^3.6.3",
"pixi-ease": "^3.0.7",
"pixi.js": "^6.0.0",
"raf": "^3.4.1",
"rollup": "^2.45.2",
"rollup": "^2.47.0",
"rollup-plugin-node-globals": "^1.4.0",
"rollup-plugin-peer-deps-external": "^2.2.4",
"rollup-plugin-serve": "^1.1.0",
Expand Down
2 changes: 1 addition & 1 deletion src/InputManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export class InputManager
* Removes all event listeners from viewport
* (useful for cleanup of wheel when removing viewport)
*/
public destroy()
public destroy(): void
{
this.viewport.options.divWheel.removeEventListener('wheel', this.wheelFunction as any);
}
Expand Down
27 changes: 16 additions & 11 deletions src/Viewport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -755,17 +755,22 @@ export class Viewport extends Container
return this;
}

// eslint-disable-next-line
// @ts-ignore
set visible(value: boolean)
{
if (!value)
{
this.input.clear();
}

super.visible = value;
}
// this doesn't work
// set visible(value: boolean)
// {
// console.log('hello!');
// if (!value)
// {
// debugger;
// this.input.clear();
// }
// super.visible = value;
// }

// get visible(): boolean
// {
// return super.visible;
// }

/**
* Zoom viewport to specific value.
Expand Down
Loading

0 comments on commit 47cc021

Please sign in to comment.