Skip to content

Commit 60ea221

Browse files
authored
Merge pull request #29 from dewiweb/develop
2.2.0-beta.0
2 parents 5d283a0 + 1208a73 commit 60ea221

4 files changed

Lines changed: 64 additions & 20 deletions

File tree

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
## [2.2.0-beta.0](https://github.com/dewiweb/MCxOSCnext/compare/v2.2.0-alpha.14...v2.2.0-beta.0) (2023-05-02)
6+
7+
8+
### Features
9+
10+
* :bug: admit matrix with empty connections ([74c8b0a](https://github.com/dewiweb/MCxOSCnext/commit/74c8b0a5a83de9808e99c0e663ef899b30ce791f))
11+
12+
13+
### Bug Fixes
14+
15+
* :bug: context menu copy/paste rich text to plain text ([1c3201a](https://github.com/dewiweb/MCxOSCnext/commit/1c3201aa9dd7f1418cf80ffb5889fe779e4513a2))
16+
517
## [2.2.0-alpha.14](https://github.com/dewiweb/MCxOSCnext/compare/v2.2.0-alpha.11...v2.2.0-alpha.14) (2023-04-28)
618

719

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "mcxoscnext",
33
"productName": "mcxoscnext",
4-
"version": "2.2.0-alpha.14",
4+
"version": "2.2.0-beta.0",
55
"description": "A bridge between emberplus and OSC protocols",
66
"main": "src/main.js",
77
"scripts": {

src/main.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -364,9 +364,15 @@ function createWindow() {
364364
/* Context Menu Items */
365365
menu: (actions, params, win, dicSuggestion) => [
366366
/* System Buttons */
367-
actions.copy(),
368-
actions.cut(),
369-
actions.paste(),
367+
actions.copy({
368+
transform: (content) => `${content}`,
369+
}),
370+
actions.cut({
371+
transform: (content) => `${content}`,
372+
}),
373+
actions.paste({
374+
transform: (content) => `${content}`,
375+
}),
370376
],
371377
});
372378
//---MENU OPERATIONS---//

src/renderer.js

Lines changed: 42 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1437,8 +1437,16 @@ async function createMatrixView(mtx_path, targets, sources, connections) {
14371437
cross.style.width = "30px";
14381438
cross.innerHTML = "⚞";
14391439
headerRow.appendChild(cross);
1440+
let lastConnection =
1441+
Object.keys(connections)[Object.keys(connections).length - 1];
1442+
console.log("🚀 : file: renderer.js:1441 : lastConnection:", lastConnection);
1443+
14401444
try {
1441-
for (i = 0; i < targets && i < 201; i++) {
1445+
for (i = 0; i < lastConnection && i < 201; i++) {
1446+
// if (i.toString() in connections) {
1447+
// for (i in connections) {
1448+
// i = Number(i);
1449+
// if (i < 201) {
14421450
console.log("🚀 : file: renderer.js:1442 : createMatrixView : i:", i);
14431451
let horHeaderCell = document.createElement("th");
14441452
horHeaderCell.innerHTML =
@@ -1456,6 +1464,7 @@ async function createMatrixView(mtx_path, targets, sources, connections) {
14561464
// e.preventDefault();
14571465
//});
14581466
headerRow.appendChild(horHeaderCell);
1467+
// }
14591468
}
14601469
} catch (error) {
14611470
console.log(
@@ -1481,20 +1490,32 @@ async function createMatrixView(mtx_path, targets, sources, connections) {
14811490
//otherCell.style.width = "20px";
14821491
//otherCell.innerHTML =
14831492
// "<input type='checkbox' style='width:100%;height:100%;z-index:-1;' unchecked >";
1484-
1485-
for (k = 0; k < targets && k < 201; k++) {
1486-
console.log("🚀 : file: renderer.js:1477 : createMatrixView : k:", k);
1487-
let otherCell = newRow.insertCell(k + 1);
1488-
otherCell.style.width = "20px";
1489-
//
1490-
otherCell.innerHTML =
1491-
"<input type='checkbox' style='width:100%;height:100%;z-index:-1;' unchecked >";
1492-
////
1493-
//onclick = 'check_uncheck(this,`" +
1494-
// mtx_path +
1495-
// "`)'>";
1496-
//otherCell.firstChild.style.zIndex = "-1";
1497-
//newRow.appendChild(otherCell);
1493+
try {
1494+
for (k = 0; k < lastConnection && k < 201; k++) {
1495+
// if (k.toString() in connections) {
1496+
//for (k in connections) {
1497+
// k = Number(k);
1498+
// if (k < 201) {
1499+
console.log("🚀 : file: renderer.js:1477 : createMatrixView : k:", k);
1500+
let otherCell = newRow.insertCell(k + 1);
1501+
otherCell.style.width = "20px";
1502+
//
1503+
if (k in connections) {
1504+
otherCell.innerHTML =
1505+
"<input type='checkbox' style='width:100%;height:100%;z-index:-1;' unchecked >";
1506+
////
1507+
//onclick = 'check_uncheck(this,`" +
1508+
// mtx_path +
1509+
// "`)'>";
1510+
//otherCell.firstChild.style.zIndex = "-1";
1511+
//newRow.appendChild(otherCell);
1512+
}
1513+
}
1514+
} catch (error) {
1515+
console.log(
1516+
"🚀 : file: renderer.js:1500 : createMatrixView : error:",
1517+
error
1518+
);
14981519
}
14991520
}
15001521
} catch (error) {
@@ -1517,7 +1538,12 @@ async function createMatrixView(mtx_path, targets, sources, connections) {
15171538
"🚀 : file: renderer.js:1381 : createMatrixView : s :",
15181539
s
15191540
);
1520-
if (matrixView.rows[connections[t].sources[s] + 1]) {
1541+
if (
1542+
matrixView.rows[connections[t].sources[s] + 1] != undefined &&
1543+
matrixView.rows[connections[t].sources[s] + 1].cells[
1544+
connections[t].target + 1
1545+
] != undefined
1546+
) {
15211547
let xcell =
15221548
matrixView.rows[connections[t].sources[s] + 1].cells[
15231549
connections[t].target + 1

0 commit comments

Comments
 (0)