vim-web 0.3.44-dev.62 → 0.3.44-dev.63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/vim-web.js
CHANGED
|
@@ -55232,6 +55232,10 @@ class Selection {
|
|
|
55232
55232
|
* If true, reselecting the currently selected single object will toggle it instead of doing nothing.
|
|
55233
55233
|
*/
|
|
55234
55234
|
__publicField(this, "toggleOnRepeatSelect", false);
|
|
55235
|
+
/**
|
|
55236
|
+
* If true, the selection manager is enabled and can modify the selection.
|
|
55237
|
+
*/
|
|
55238
|
+
__publicField(this, "enabled", true);
|
|
55235
55239
|
this._adapter = adapter;
|
|
55236
55240
|
}
|
|
55237
55241
|
/**
|
|
@@ -55271,6 +55275,7 @@ class Selection {
|
|
|
55271
55275
|
return Array.isArray(oneOrMore) ? oneOrMore : [oneOrMore];
|
|
55272
55276
|
}
|
|
55273
55277
|
select(objectOrObjects) {
|
|
55278
|
+
if (!this.enabled) return;
|
|
55274
55279
|
if (!objectOrObjects) {
|
|
55275
55280
|
this.clear();
|
|
55276
55281
|
return;
|
|
@@ -55294,6 +55299,7 @@ class Selection {
|
|
|
55294
55299
|
this._onSelectionChanged.requestDispatch();
|
|
55295
55300
|
}
|
|
55296
55301
|
toggle(objectOrObjects) {
|
|
55302
|
+
if (!this.enabled) return;
|
|
55297
55303
|
const objects = this.toArray(objectOrObjects);
|
|
55298
55304
|
let changed = false;
|
|
55299
55305
|
for (const obj of objects) {
|
|
@@ -55312,6 +55318,7 @@ class Selection {
|
|
|
55312
55318
|
}
|
|
55313
55319
|
}
|
|
55314
55320
|
add(objectOrObjects) {
|
|
55321
|
+
if (!this.enabled) return;
|
|
55315
55322
|
const objects = this.toArray(objectOrObjects);
|
|
55316
55323
|
let changed = false;
|
|
55317
55324
|
for (const obj of objects) {
|
|
@@ -55326,6 +55333,7 @@ class Selection {
|
|
|
55326
55333
|
}
|
|
55327
55334
|
}
|
|
55328
55335
|
remove(objectOrObjects) {
|
|
55336
|
+
if (!this.enabled) return;
|
|
55329
55337
|
const objects = this.toArray(objectOrObjects);
|
|
55330
55338
|
let changed = false;
|
|
55331
55339
|
for (const obj of objects) {
|
|
@@ -55342,6 +55350,7 @@ class Selection {
|
|
|
55342
55350
|
* Clears the entire selection.
|
|
55343
55351
|
*/
|
|
55344
55352
|
clear() {
|
|
55353
|
+
if (!this.enabled) return;
|
|
55345
55354
|
if (this._selection.size === 0) return;
|
|
55346
55355
|
for (const obj of this._selection) {
|
|
55347
55356
|
this._adapter.outline(obj, false);
|