Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Koushikphy committed Oct 7, 2020
1 parent eb50d33 commit 1cfd7df
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ button:active {



#plotlist{
/* #plotlist{
padding: 1px;
width: 1.25pc;
padding-top: 3px;
Expand All @@ -261,7 +261,7 @@ button:active {
background: radial-gradient(#eee, transparent) !important;
box-shadow: none;
outline: none;
}
} */

.disabled {
pointer-events: none;
Expand Down
6 changes: 3 additions & 3 deletions src/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<div id="split-bar"></div>
<div class="closebtn" onclick="closeNav()">X</div>
<div class="sideheader"> Plots</div>
<div id="lockAllAxes">
<div id="lockAllAxes"> <!-- onclick="isAxesLocked =!isAxesLocked; document.getElementById('lockAxes').checked=isAxesLocked"> -->
<input type="checkbox" id="lockAxes" name="axes" value="lockAxes" onclick="isAxesLocked =this.checked">
<span for="lockAxes">Lock Axes</span>
</div>
Expand Down Expand Up @@ -215,13 +215,13 @@
</div>
</div>

<div id="popupPlotList" class="popup">
<!-- <div id="popupPlotList" class="popup">
<div class="title">
<label class='titletxt'>List of Plots</label>
<b class='closbtn' title="Close">X</b>
</div>
<div class="popmain"></div>
</div>
</div> -->

<div id = "branding">
<a title="Follow Me" href='javascript:void(0);' onclick="shell.openExternal('https://koushikphy.github.io/')">
Expand Down
19 changes: 13 additions & 6 deletions src/js/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ function updateData(init=false,all=true) {
col.x = xCol.selectedIndex;
col.y = yCol.selectedIndex;
col.z = zCol.selectedIndex;
legendNames[currentEditable] = path.basename(fileNames[currentEditable]) + ` ${col.y + 1}:${col.z + 1}`
}
th_in = 0;

Expand All @@ -107,7 +106,15 @@ function updateData(init=false,all=true) {
} else{
[col.x, col.y] = [col.y, col.x]
}
fullDataCols[currentEditable] = JSON.parse(JSON.stringify(col));
if(isAxesLocked){
for(let i=0; i<fullDataCols.length; i++) {
fullDataCols[i] = JSON.parse(JSON.stringify(col))
legendNames[i] = path.basename(fileNames[i]) + ` ${col.y + 1}:${col.z + 1}`
}
} else {
fullDataCols[currentEditable] = JSON.parse(JSON.stringify(col));
legendNames[currentEditable] = path.basename(fileNames[currentEditable]) + ` ${col.y + 1}:${col.z + 1}`
}

if(ddd) setUpSlider()

Expand Down Expand Up @@ -871,7 +878,7 @@ function closeNav() {



function tools2(option,index){
function tools(option,index){
if(option==0){ //select editable
if(currentEditable!=index) changeEditable(index)
}else if (option==1) { // clone this
Expand Down Expand Up @@ -901,15 +908,15 @@ function makeRows() {
fileNames.map((i,j)=>{
return `
<div class="fList ${currentEditable==j? 'selected': ''}" >
<div class="fName" onclick="tools2(0,${j})" title=${replaceWithHome(i)}>
<div class="fName" onclick="tools(0,${j})" title=${replaceWithHome(i)}>
${j+1}. ${path.basename(i)}
</div>
<div class="fclsBtn" onclick="tools2(2,${j})" title='Remove this file' ${currentEditable==j? 'style="pointer-events: none;opacity: 0.4;"': ''}>
<div class="fclsBtn" onclick="tools(2,${j})" title='Remove this file' ${currentEditable==j? 'style="pointer-events: none;opacity: 0.4;"': ''}>
<svg viewBox="0 0 1792 1792">
<path d="M1490 1322q0 40-28 68l-136 136q-28 28-68 28t-68-28l-294-294-294 294q-28 28-68 28t-68-28l-136-136q-28-28-28-68t28-68l294-294-294-294q-28-28-28-68t28-68l136-136q28-28 68-28t68 28l294 294 294-294q28-28 68-28t68 28l136 136q28 28 28 68t-28 68l-294 294 294 294q28 28 28 68z"/>
</svg>
</div>
<div class="fcpyBtn" onclick="tools2(1,${j})" title='Use this file'>
<div class="fcpyBtn" onclick="tools(1,${j})" title='Use this file'>
<svg viewBox="0 0 1792 1792">
<path d="M1664 1632v-1088q0-13-9.5-22.5t-22.5-9.5h-1088q-13 0-22.5 9.5t-9.5 22.5v1088q0 13 9.5 22.5t22.5 9.5h1088q13 0 22.5-9.5t9.5-22.5zm128-1088v1088q0 66-47 113t-113 47h-1088q-66 0-113-47t-47-113v-1088q0-66 47-113t113-47h1088q66 0 113 47t47 113zm-384-384v160h-128v-160q0-13-9.5-22.5t-22.5-9.5h-1088q-13 0-22.5 9.5t-9.5 22.5v1088q0 13 9.5 22.5t22.5 9.5h160v128h-160q-66 0-113-47t-47-113v-1088q0-66 47-113t113-47h1088q66 0 113 47t47 113z"/>
</svg>
Expand Down
2 changes: 1 addition & 1 deletion src/js/version.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function _versionCheck() {
var res = dialog.showMessageBoxSync({
type: "question",
title: "Update available!!!",
message: `A new version of the software ${new_ver} is available.\n Do you want to download it now?`,
message: `A new version of the software ${new_ver} is available.\nDo you want to download it now?`,
buttons: ['OK', "Cancel"]
})
if (!res) {
Expand Down

0 comments on commit 1cfd7df

Please sign in to comment.