Преглед на файлове

Added import functionality of Arduino code (without disturbing whitespaces and empty lines)

dds
Manfred Müller-Späth преди 10 години
родител
ревизия
563aa6482c
променени са 1 файла, в които са добавени 13 реда и са изтрити 0 реда
  1. +13
    -0
      gui/red/ui/view.js

+ 13
- 0
gui/red/ui/view.js Целия файл

* - attached to mouse for placing - 'IMPORT_DRAGGING' * - attached to mouse for placing - 'IMPORT_DRAGGING'
*/ */
function importNodes(newNodesStr,touchImport) { function importNodes(newNodesStr,touchImport) {
// TODO: solve this more elegant as the system expects
if ($("#node-input-arduino").prop('checked') === true) {
newNodesStr = RED.nodes.cppToJSON(newNodesStr);
createNewIds = false;
RED.storage.clear();
localStorage.setItem("audio_library_guitool", newNodesStr);
RED.storage.load();
redraw();
return;
}

try { try {
var createNewIds = true;
var result = RED.nodes.import(newNodesStr,true); var result = RED.nodes.import(newNodesStr,true);
if (result) { if (result) {
var new_nodes = result[0]; var new_nodes = result[0];

Loading…
Отказ
Запис