mirror of
https://github.com/penpot/penpot.git
synced 2025-05-21 14:46:12 +02:00
Move intervaltre under uxbox.util submodule.
This commit is contained in:
parent
77933f3949
commit
bced1ebd2f
1 changed files with 14 additions and 11 deletions
|
@ -6,15 +6,18 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
goog.provide("intervaltree.core");
|
|
||||||
|
goog.provide("uxbox.util.intervaltree_impl");
|
||||||
goog.require("goog.asserts");
|
goog.require("goog.asserts");
|
||||||
goog.require("goog.array");
|
goog.require("goog.array");
|
||||||
|
|
||||||
goog.scope(function() {
|
goog.scope(function() {
|
||||||
|
const self = uxbox.util.intervaltree_impl;
|
||||||
|
|
||||||
const assert = goog.asserts.assert;
|
const assert = goog.asserts.assert;
|
||||||
const every = goog.array.every;
|
const every = goog.array.every;
|
||||||
|
|
||||||
const ID_SYM = Symbol.for("intervaltree.core:id-sym");
|
const ID_SYM = Symbol.for("uxbox.util.intervaltree:id-sym");
|
||||||
|
|
||||||
// --- Types Declaration
|
// --- Types Declaration
|
||||||
|
|
||||||
|
@ -383,20 +386,20 @@ goog.scope(function() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Api
|
// Api
|
||||||
intervaltree.core.create = create;
|
self.create = create;
|
||||||
intervaltree.core.add = add;
|
self.add = add;
|
||||||
intervaltree.core.remove = remove;
|
self.remove = remove;
|
||||||
intervaltree.core.removeById = removeById;
|
self.removeById = removeById;
|
||||||
intervaltree.core.contains = contains;
|
self.contains = contains;
|
||||||
intervaltree.core.search = search;
|
self.search = search;
|
||||||
intervaltree.core.searchSingle = searchSingle;
|
self.searchSingle = searchSingle;
|
||||||
|
|
||||||
// Test
|
// Test
|
||||||
module.test = function() {
|
self.test = function() {
|
||||||
// const util = require('util');
|
// const util = require('util');
|
||||||
|
|
||||||
console.time("init");
|
console.time("init");
|
||||||
const tree = module.create([
|
const tree = self.create([
|
||||||
[1,5], [-5, 10], [4, 9],
|
[1,5], [-5, 10], [4, 9],
|
||||||
[10,14], [-10, 1], [9, 22],
|
[10,14], [-10, 1], [9, 22],
|
||||||
]);
|
]);
|
Loading…
Add table
Add a link
Reference in a new issue