mirror of
https://github.com/umap-project/umap.git
synced 2025-04-29 11:52:38 +02:00
wip: do not use public class fields yet
Browser support is not enough.
This commit is contained in:
parent
f10d345113
commit
6bdba1d0ed
1 changed files with 12 additions and 11 deletions
|
@ -3,7 +3,6 @@ import * as Utils from './utils.js'
|
|||
import { translate } from './i18n.js'
|
||||
|
||||
class Rule {
|
||||
_condition = null
|
||||
|
||||
get condition() {
|
||||
return this._condition
|
||||
|
@ -14,7 +13,6 @@ class Rule {
|
|||
this.parse()
|
||||
}
|
||||
|
||||
_isDirty = false
|
||||
|
||||
get isDirty() {
|
||||
return this._isDirty
|
||||
|
@ -26,6 +24,18 @@ class Rule {
|
|||
}
|
||||
|
||||
constructor(map, condition = '', options = {}) {
|
||||
// TODO make this public properties when browser coverage is ok
|
||||
// cf https://caniuse.com/?search=public%20class%20field
|
||||
this._condition = null
|
||||
this._isDirty = false
|
||||
this.OPERATORS = [
|
||||
['>', this.gt],
|
||||
['<', this.lt],
|
||||
// When sent by Django
|
||||
['<', this.lt],
|
||||
['!=', this.not_equal],
|
||||
['=', this.equal],
|
||||
]
|
||||
this.map = map
|
||||
this.active = true
|
||||
this.options = options
|
||||
|
@ -52,15 +62,6 @@ class Rule {
|
|||
return other < this.expected
|
||||
}
|
||||
|
||||
OPERATORS = [
|
||||
['>', this.gt],
|
||||
['<', this.lt],
|
||||
// When sent by Django
|
||||
['<', this.lt],
|
||||
['!=', this.not_equal],
|
||||
['=', this.equal],
|
||||
]
|
||||
|
||||
parse() {
|
||||
let vars = []
|
||||
this.cast = (v) => v
|
||||
|
|
Loading…
Reference in a new issue