Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
},
"peerDependencies": {
"rete": "^2.0.1",
"rete-area-plugin": "^2.0.0"
"rete-area-plugin": "^2.1.4"
},
"devDependencies": {
"globals": "^15.9.0",
"rete": "^2.0.1",
"rete-area-plugin": "^2.0.0",
"rete-area-plugin": "^2.1.4",
"rete-cli": "~2.0.1",
"rollup-plugin-sass": "1.12.17",
"typescript": "4.8.4"
Expand Down
8 changes: 4 additions & 4 deletions src/extensions/selectable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
* @param selector Selector instance
* @param accumulating Accumulating state
*/
export function selectable<S extends ExpectedSchemes, K>(plugin: CommentPlugin<S, K>, selector: Selector, accumulating: { active(): boolean }) {

Check warning on line 13 in src/extensions/selectable.ts

View workflow job for this annotation

GitHub Actions / ci / ci

This line has a length of 144. Maximum allowed is 120

Check warning on line 13 in src/extensions/selectable.ts

View workflow job for this annotation

GitHub Actions / ci / ci

This line has a length of 144. Maximum allowed is 120
// eslint-disable-next-line max-statements, complexity
plugin.addPipe(context => {
plugin.addPipe(async context => {
if (!context || typeof context !== 'object' || !('type' in context)) return context

if (context.type === 'commentlinktranslate') {
Expand All @@ -24,8 +24,8 @@
const comment = context.data
const { id } = comment

if (!accumulating.active()) selector.unselectAll()
selector.add({
if (!accumulating.active()) await selector.unselectAll()
await selector.add({
id,
label: 'comment',
translate(dx, dy) {
Expand All @@ -41,7 +41,7 @@
if (context.type === 'commentunselected') {
const { id } = context.data

selector.remove({ id, label: 'comment' })
await selector.remove({ id, label: 'comment' })
}
if (context.type === 'commenttranslated') {
const { id, dx, dy } = context.data
Expand Down
Loading