Skip to content

Commit

Permalink
Refactor #1878 - DomHandler
Browse files Browse the repository at this point in the history
  • Loading branch information
mertsincan committed Mar 16, 2021
1 parent 36acb86 commit 39795d2
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/components/utils/DomHandler.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import PrimeReact from '../api/PrimeReact';

export default class DomHandler {

static innerWidth(el) {
Expand Down Expand Up @@ -102,12 +104,16 @@ export default class DomHandler {
}

static generateZIndex() {
this.zindex = this.zindex||999;
return ++this.zindex;
this.zIndex = this.zIndex||PrimeReact.zIndex;
return ++this.zIndex;
}

static revertZIndex() {
this.zIndex = PrimeReact.zIndex < this.zIndex ? --this.zIndex : PrimeReact.zIndex;
}

static getCurrentZIndex() {
return this.zindex;
return this.zIndex;
}

static index(element) {
Expand Down

0 comments on commit 39795d2

Please sign in to comment.