Skip to content

Commit afea60e

Browse files
committed
Updated view show and hide methods
1 parent 640dbe7 commit afea60e

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

js/view.js

+6-4
Original file line numberDiff line numberDiff line change
@@ -87,17 +87,19 @@ export default class View extends Emitter {
8787
* Set visibility so that view is rendered.
8888
* @returns {View}
8989
*/
90-
$show() {
91-
this.$node.style.visibility = 'visible';
90+
show() {
91+
this.$node.classList.add('visible');
92+
this.$node.classList.remove('invisible');
9293
return this;
9394
}
9495

9596
/**
9697
* Set visibility so that view is not rendered.
9798
* @returns {View}
9899
*/
99-
$hide() {
100-
this.$node.style.visibility = 'hidden';
100+
hide() {
101+
this.$node.classList.add('invisible');
102+
this.$node.classList.remove('visible');
101103
return this;
102104
}
103105
}

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@djthorpe/js-framework",
3-
"version": "0.0.40",
3+
"version": "0.0.41",
44
"description": "Javascript Framework",
55
"main": "dist/index.js",
66
"scripts": {

0 commit comments

Comments
 (0)