mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-04 08:50:33 +08:00
Minification of code and html string template
This commit is contained in:
@@ -10,9 +10,9 @@ export default class IntegerEntity extends Entity {
|
||||
return IntegerEntity.attributes
|
||||
}
|
||||
|
||||
constructor(options = { value: 0 }) {
|
||||
options.value = Math.round(options.value)
|
||||
constructor(options = {}) {
|
||||
super(options)
|
||||
this.value = Math.round(this.value)
|
||||
}
|
||||
|
||||
valueOf() {
|
||||
|
||||
10
js/entity/NaturalNumberEntity.js
Executable file
10
js/entity/NaturalNumberEntity.js
Executable file
@@ -0,0 +1,10 @@
|
||||
import IntegerEntity from "./IntegerEntity"
|
||||
import Utility from "../Utility"
|
||||
|
||||
export default class NaturalNumberEntity extends IntegerEntity {
|
||||
|
||||
constructor(options = {}) {
|
||||
super(options)
|
||||
this.value = Math.round(Utility.clamp(this.value, 0))
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user