Compare commits
8
Commits
v1.5.1
...
ad7c925f6b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ad7c925f6b | ||
|
|
9c762b8cb5 | ||
|
|
40890b3d93 | ||
|
|
eb0cd8ecad | ||
|
|
b495823333 | ||
|
|
f537e3a583 | ||
|
|
7721cd7322 | ||
|
|
6ee2ad8e9a |
+17
-13
@@ -135,7 +135,6 @@ var option_hold = 0;
|
|||||||
var control_hold = 0;
|
var control_hold = 0;
|
||||||
var cmd_hold = 0;
|
var cmd_hold = 0;
|
||||||
var modifier = null; // null lock rename delete store drag_swap
|
var modifier = null; // null lock rename delete store drag_swap
|
||||||
var is_updating_names = 0;
|
|
||||||
var is_interpolating = 0;
|
var is_interpolating = 0;
|
||||||
var is_moving = 0;
|
var is_moving = 0;
|
||||||
var is_dragging = 0; // Drag flag
|
var is_dragging = 0; // Drag flag
|
||||||
@@ -229,6 +228,13 @@ function slot(left, top, right, bottom) {
|
|||||||
slot.local = 1;
|
slot.local = 1;
|
||||||
|
|
||||||
function loadbang() {
|
function loadbang() {
|
||||||
|
// If running in a M4L device, for some reason loadbang needs to be delayed in order to properly get presets stored in Live set
|
||||||
|
// So we bypass the initial loadbang, and we rely on init_tsk instead
|
||||||
|
if (max.isplugin) return;
|
||||||
|
do_loadbang();
|
||||||
|
}
|
||||||
|
|
||||||
|
function do_loadbang() {
|
||||||
// post("loadbang\n");
|
// post("loadbang\n");
|
||||||
has_loaded = true;
|
has_loaded = true;
|
||||||
this.box.setboxattr('border', 0);
|
this.box.setboxattr('border', 0);
|
||||||
@@ -245,7 +251,7 @@ init_tsk.schedule(200);
|
|||||||
|
|
||||||
function delayed_init() {
|
function delayed_init() {
|
||||||
if (!has_loaded) {
|
if (!has_loaded) {
|
||||||
loadbang();
|
do_loadbang();
|
||||||
}
|
}
|
||||||
if (arguments.callee.task.valid) {
|
if (arguments.callee.task.valid) {
|
||||||
arguments.callee.task.freepeer();
|
arguments.callee.task.freepeer();
|
||||||
@@ -306,7 +312,7 @@ function calc_rows_columns(src) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Preventing useless redraws when resizing
|
// Preventing useless redraws when resizing
|
||||||
if (src === "resize" && previous_rows === rows && previous_columns === columns) return false;
|
if (src === "resize" && layout === 0 && previous_rows === rows && previous_columns === columns) return false;
|
||||||
|
|
||||||
true_slots_count_display = columns * rows - minus_slots_carry;
|
true_slots_count_display = columns * rows - minus_slots_carry;
|
||||||
slots_count_display = scrollable && nbslot_edit ? true_slots_count_display - 2 : true_slots_count_display;
|
slots_count_display = scrollable && nbslot_edit ? true_slots_count_display - 2 : true_slots_count_display;
|
||||||
@@ -1025,7 +1031,6 @@ function slotlist() {
|
|||||||
for (var i = 0; i < filled_slots.length; i++) {
|
for (var i = 0; i < filled_slots.length; i++) {
|
||||||
slots[filled_slots[i]].filled = true;
|
slots[filled_slots[i]].filled = true;
|
||||||
}
|
}
|
||||||
is_updating_names = 1;
|
|
||||||
to_pattrstorage("getslotnamelist");
|
to_pattrstorage("getslotnamelist");
|
||||||
get_all_presets_metadata();
|
get_all_presets_metadata();
|
||||||
update_filled_slots_dict();
|
update_filled_slots_dict();
|
||||||
@@ -1036,12 +1041,9 @@ function slotname() {
|
|||||||
var args = arrayfromargs(arguments);
|
var args = arrayfromargs(arguments);
|
||||||
var slot = args[0];
|
var slot = args[0];
|
||||||
var name = args[1];
|
var name = args[1];
|
||||||
if (slot == 'done') {
|
if (slot === 'done') return;
|
||||||
is_updating_names = 0;
|
if (slot > 0 && name !== "(undefined)") {
|
||||||
return;
|
if (slots[slot].filled === false && name !== "<(unnamed)>") {
|
||||||
}
|
|
||||||
if (slot > 0 && name != "(undefined)") {
|
|
||||||
if (is_updating_names == 1 && slots[slot].filled === false && name !== "<(unnamed)>") {
|
|
||||||
// Removing parenthesis automatically added by pattrstorage if the preset has a name but isn't filled
|
// Removing parenthesis automatically added by pattrstorage if the preset has a name but isn't filled
|
||||||
name = name.slice(1, -1);
|
name = name.slice(1, -1);
|
||||||
}
|
}
|
||||||
@@ -1484,7 +1486,6 @@ function resync() {
|
|||||||
to_pattrstorage("getslotlist");
|
to_pattrstorage("getslotlist");
|
||||||
to_pattrstorage("getlockedslots");
|
to_pattrstorage("getlockedslots");
|
||||||
calc_rows_columns();
|
calc_rows_columns();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function find_pattrstorage(name) {
|
function find_pattrstorage(name) {
|
||||||
@@ -1933,11 +1934,11 @@ ondblclick.local = 1;
|
|||||||
function ondrag(x,y,but,cmd,shift,capslock,option,ctrl)
|
function ondrag(x,y,but,cmd,shift,capslock,option,ctrl)
|
||||||
{
|
{
|
||||||
if (pattrstorage_name != null) {
|
if (pattrstorage_name != null) {
|
||||||
y -= y_offset;
|
|
||||||
if (is_dragging === 0 && !but) {
|
if (is_dragging === 0 && !but) {
|
||||||
// Triggering onclick() interactions when click releases if no drag happened
|
// Triggering onclick() interactions when click releases if no drag happened
|
||||||
onclick(x, y, 0, cmd, shift, capslock, option, ctrl);
|
onclick(x, y, 0, cmd, shift, capslock, option, ctrl);
|
||||||
}
|
}
|
||||||
|
y -= y_offset;
|
||||||
if (drag_mode > 0 && !cmd && !shift && !ctrl) {
|
if (drag_mode > 0 && !cmd && !shift && !ctrl) {
|
||||||
switch (is_dragging) {
|
switch (is_dragging) {
|
||||||
case 0: // Not dragging yet
|
case 0: // Not dragging yet
|
||||||
@@ -2075,7 +2076,7 @@ function ondrag(x,y,but,cmd,shift,capslock,option,ctrl)
|
|||||||
if (!but) {
|
if (!but) {
|
||||||
// When the click releases, we force onidle() to compute currently hovered slot
|
// When the click releases, we force onidle() to compute currently hovered slot
|
||||||
last_x += 1;
|
last_x += 1;
|
||||||
onidle(x, y, but, cmd, shift, capslock, option, ctrl);
|
onidle(x, y + y_offset, but, cmd, shift, capslock, option, ctrl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2152,6 +2153,9 @@ function setpattrstorage(v){
|
|||||||
} else {
|
} else {
|
||||||
pattrstorage_name = arrayfromargs(arguments)[0];
|
pattrstorage_name = arrayfromargs(arguments)[0];
|
||||||
}
|
}
|
||||||
|
if (has_loaded) {
|
||||||
|
do_loadbang();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
setpattrstorage.local = 1;
|
setpattrstorage.local = 1;
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name" : "tc.preset",
|
"name" : "tc.preset",
|
||||||
"displayname" : "",
|
"displayname" : "",
|
||||||
"version" : "1.5.1",
|
"version" : "1.5.4",
|
||||||
"author" : "Théophile Clet",
|
"author" : "Théophile Clet",
|
||||||
"authors" : [ ],
|
"authors" : [ ],
|
||||||
"description" : "A jsui replacement for the preset object",
|
"description" : "A jsui replacement for the preset object",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name" : "tc.preset",
|
"name" : "tc.preset",
|
||||||
"displayname" : "",
|
"displayname" : "",
|
||||||
"version" : "1.5.1",
|
"version" : "1.5.4",
|
||||||
"author" : "Théophile Clet",
|
"author" : "Théophile Clet",
|
||||||
"authors" : [ ],
|
"authors" : [ ],
|
||||||
"description" : "A v8ui replacement for the preset object",
|
"description" : "A v8ui replacement for the preset object",
|
||||||
|
|||||||
Reference in New Issue
Block a user