From b90a78f6c4cbdfaef3955227b5a26b9f61764733 Mon Sep 17 00:00:00 2001 From: tak_sas Date: Sun, 2 Jan 2022 14:51:18 +0900 Subject: [PATCH 1/3] change "get_and_set" --- get_and_set.html | 432 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 428 insertions(+), 4 deletions(-) diff --git a/get_and_set.html b/get_and_set.html index b6b80cf..abd5e0e 100644 --- a/get_and_set.html +++ b/get_and_set.html @@ -2,7 +2,10 @@ - + @@ -20,20 +23,111 @@ $simcir.find('.simcir-workspace') ).text(); }; var setCircuitData = function(data) { - $simcir.children().remove(); $s.setupSimcir($simcir, JSON.parse(data) ); }; // button click events $('#getDataBtn').click(function() { + $('#tempArea').val(getCircuitData() ); + setCircuitData($('#dataArea').val() ); + $('#backup1Area').val(getCircuitData() ); + setCircuitData($('#tempArea').val() ); + $('#dataArea').val(getCircuitData() ); + }); + $('#backup1DataBtn').click(function() { + $('#tempArea').val(getCircuitData() ); + setCircuitData($('#backup1Area').val() ); $('#dataArea').val(getCircuitData() ); + setCircuitData($('#tempArea').val() ); + }); + + $('#setDataBtn').click(function() { + $('#backup2Area').val(getCircuitData() ); setCircuitData($('#dataArea').val() ); }); + $('#backup2DataBtn').click(function() { + setCircuitData($('#backup2Area').val() ); + }); + + + + + + + //switcher + $('#copyfromsubDataBtn').click(function() { + $('#tempArea').val(getCircuitData() ); + setCircuitData($('#subArea').val() ); + $('#dataArea').val(getCircuitData() ); + setCircuitData($('#tempArea').val() ); + }); + + $('#copyfrommainDataBtn').click(function() { + $('#tempArea').val(getCircuitData() ); + setCircuitData($('#dataArea').val() ); + $('#subArea').val(getCircuitData() ); + setCircuitData($('#tempArea').val() ); + }); + + $('#switchDataBtn').click(function() { + $('#tempArea').val(getCircuitData() ); + setCircuitData($('#dataArea').val() ); + $('#temp2Area').val(getCircuitData() ); + setCircuitData($('#subArea').val() ); + $('#dataArea').val(getCircuitData() ); + setCircuitData($('#temp2Area').val() ); + $('#subArea').val(getCircuitData() ); + setCircuitData($('#tempArea').val() ); + }); + + + + +//SUB BUTTON + + $('#getsubDataBtn').click(function() { + $('#tempArea').val(getCircuitData() ); + setCircuitData($('#subArea').val() ); + $('#backup1subArea').val(getCircuitData() ); + setCircuitData($('#tempArea').val() ); + $('#subArea').val(getCircuitData() ); + }); + + $('#backup1subDataBtn').click(function() { + $('#tempArea').val(getCircuitData() ); + setCircuitData($('#backup1subArea').val() ); + $('#subArea').val(getCircuitData() ); + setCircuitData($('#tempArea').val() ); + + }); + + + $('#setsubDataBtn').click(function() { + $('#backup2subArea').val(getCircuitData() ); + setCircuitData($('#subArea').val() ); + }); + + $('#backup2subDataBtn').click(function() { + setCircuitData($('#backup2subArea').val() ); + }); + + + + + + + + $('#defaultDataBtn').click(function() { + setCircuitData($('#defaultArea').val() ); + }); + $('#clearDataBtn').click(function() { + setCircuitData($('#clearArea').val() ); + }); // load default (just specifies circuit size). - setCircuitData('{ "width":600, "height":200 }'); + setCircuitData($('#dataArea').val(),'{ "width":2100, "height":830 }'); }); @@ -42,8 +136,338 @@
+ + +

+ + + + + +

+ + + +
- + + + + + + + + + + + + + + From 746afb6794fe9de9b51433b189bf85bc44beb01c Mon Sep 17 00:00:00 2001 From: tak_sas Date: Tue, 4 Jan 2022 19:57:52 +0900 Subject: [PATCH 2/3] LICENCE ADDED --- README.txt | 11 +++++++++++ get_and_set.html | 8 ++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/README.txt b/README.txt index 984240a..1505e56 100644 --- a/README.txt +++ b/README.txt @@ -1,3 +1,14 @@ +SimcirJS-Web + +SimcirJS-Web Copyright (c) 2021 taksas (URL: https://taksas.tech/). + The original version of this project is "SimcirJS" (https://kazuhikoarase.github.io/simcirjs/). + I have made some small additions and layout changes. + +Licensed under the MIT license:http://www.opensource.org/licenses/mit-license.php + + +----- Original Project Licence ----- + SimcirJS Copyright (c) 2014 Kazuhiko Arase diff --git a/get_and_set.html b/get_and_set.html index abd5e0e..e6395af 100644 --- a/get_and_set.html +++ b/get_and_set.html @@ -1,6 +1,7 @@ - + + SimcirJS-Web