From 77ca4778d39902e15dc8944dd0322be108909036 Mon Sep 17 00:00:00 2001 From: Ajeet Pratap Singh Date: Sat, 10 Aug 2024 17:55:10 +0530 Subject: [PATCH] [3851] - Fix multi-mouse bug on block creation and collaboration link text (#3967) * fixes #3913 * fix:resolves grid position on hamburger opening(#3914) (#3924) * fix:resolves hamburger opening(#3914) * fix:fixes #3914(suggested changes done) * adjust size of grid element repositioning when using aux toolbar --------- Co-authored-by: Walter Bender * Fix input boxes (#3927) * bump version * enhancement: scale on hover (#3926) Co-authored-by: anas2357 <141234155+anas2357@users.noreply.github.com> * calculate frequencies from ratio * Add close button to extended-menu pie menu (fixes #3933) (#3934) * Bump braces and gulp (#3903) Bumps [braces](https://github.com/micromatch/braces) to 3.0.3 and updates ancestor dependency [gulp](https://github.com/gulpjs/gulp). These dependencies need to be updated together. Updates `braces` from 2.3.2 to 3.0.3 - [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md) - [Commits](https://github.com/micromatch/braces/commits/3.0.3) Updates `gulp` from 4.0.2 to 5.0.0 - [Release notes](https://github.com/gulpjs/gulp/releases) - [Changelog](https://github.com/gulpjs/gulp/blob/master/CHANGELOG.md) - [Commits](https://github.com/gulpjs/gulp/compare/v4.0.2...v5.0.0) --- updated-dependencies: - dependency-name: braces dependency-type: indirect - dependency-name: gulp dependency-type: direct:development ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * add support for solfege accidentals in phrasemaker * Add support for cents (#3937) * add support for cents through semi-tone transposition * add 50 cents macro * add cents example * add output frequencies * fix issue with ratio cents * add a ratio-cents example * Ratio transpose and Ratio interval (#3936) * use processPitch for all pitch types * Add support for cents (#3937) * add support for cents through semi-tone transposition * add 50 cents macro * add cents example * add output frequencies * fix issue with ratio cents * add a ratio-cents example * use processPitch for all pitch types * convert freq to note before scalar step * fix note convert * remove extra comma throwing off indexing * Hyperscore link update (#3939) (#3947) * Update Hyperscore example link in guide.html (#3944) * Update README.md (#3943) * left_and_back_images (#3950) * Updated Dockerfile (#3949) * Update README.md * Update dockerfile * remove yjs and socket.io dependecies * Fixed #3956 Auto increasing and decreasing input block (#3957) * fixes #3941 * fixes #3958 * Fixes collapsed state of note block (#3961) * fixes issue with extra line number in JavaScript Editor (#3962) * fixes sample block duplication issue (#3965) * fixes sample block duplication issue * changed error message * updated error message * Fix multi-mouse bug * Fix collab link text --------- Signed-off-by: dependabot[bot] Co-authored-by: Walter Bender Co-authored-by: Nikhil <154296996+BeNikk@users.noreply.github.com> Co-authored-by: Anas <141234155+Anas-2357@users.noreply.github.com> Co-authored-by: anas2357 <141234155+anas2357@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Walter Bender Co-authored-by: Harshit Verma Co-authored-by: Geeten Parab <147247925+GeetenParab@users.noreply.github.com> Co-authored-by: akilesh1706 <126157319+akilesh1706@users.noreply.github.com> Co-authored-by: Khadar vali <124120102+khadar1020@users.noreply.github.com> Co-authored-by: Muhammad Haroon <104259212+haroon10725@users.noreply.github.com> --- js/activity.js | 39 +++++++++++++++++-------------- js/collaboration/collaboration.js | 4 ---- 2 files changed, 21 insertions(+), 22 deletions(-) diff --git a/js/activity.js b/js/activity.js index 46be8f192c..500a626fd0 100644 --- a/js/activity.js +++ b/js/activity.js @@ -567,24 +567,27 @@ class Activity { // this.doLoadAnimation(); this.blocks.isLocalUpdate = false; - // Render the blocks - for (const name in this.palettes.dict) { - this.palettes.dict[name].hideMenu(true); - } - - this.stage.removeAllEventListeners("trashsignal"); - - // Wait for the old blocks to be removed. - // eslint-disable-next-line no-unused-vars - const __listener = (event) => { - this.blocks.loadNewBlocks(data); + setTimeout(() => { + // Render the blocks + for (const name in this.palettes.dict) { + this.palettes.dict[name].hideMenu(true); + } + this.stage.removeAllEventListeners("trashsignal"); - }; + + // Wait for the old blocks to be removed. + // eslint-disable-next-line no-unused-vars + const __listener = (event) => { + this.blocks.loadNewBlocks(data); + this.stage.removeAllEventListeners("trashsignal"); + }; + + this.stage.addEventListener("trashsignal", __listener, false); + this.sendAllToTrash(false, false); + this._allClear(false); + this.refreshCanvas(); + }, 500) - this.stage.addEventListener("trashsignal", __listener, false); - this.sendAllToTrash(false, false); - this._allClear(false); - this.refreshCanvas(); }; /** @@ -5935,10 +5938,10 @@ class Activity { if (room_id) { this.room_id = room_id; - this.textMsg(`_("Collaboration link: ") ${collabUrl}`); + this.textMsg(`${_("Collaboration link: ")} ${collabUrl}`); this._initiateCollaboration(this.room_id); }; - }, 7000); + }, 5000); /* document.addEventListener("mousewheel", scrollEvent, false); document.addEventListener("DOMMouseScroll", scrollEvent, false); diff --git a/js/collaboration/collaboration.js b/js/collaboration/collaboration.js index ed49b7b87e..8010808364 100644 --- a/js/collaboration/collaboration.js +++ b/js/collaboration/collaboration.js @@ -65,14 +65,10 @@ class Collaboration { }); socket.on("new-block-added", (update) => { - this.activity.textMsg("New block added. rendering..."); - setTimeout(this.activity.hideMsgs, 10000); this.activity.renderProjectFromData(update); }); socket.on("new-block-deleted", (update) => { - this.activity.textMsg("New block deleted. rendering..."); - setTimeout(this.activity.hideMsgs, 10000); this.activity.renderProjectFromData(update); });