diff --git a/app/css/sidebar.css b/app/css/sidebar.css index cbe40cf..2bd4abc 100644 --- a/app/css/sidebar.css +++ b/app/css/sidebar.css @@ -80,7 +80,7 @@ .sidebar { width: 2.5em; height: 100%; - top: 2.2em; + top: 1.4em; overflow: hidden; background-color: var(--main-color); transform: translateZ(0); diff --git a/app/css/style.css b/app/css/style.css index 702fe3d..c6b71b5 100644 --- a/app/css/style.css +++ b/app/css/style.css @@ -260,6 +260,7 @@ h1 { text-align: center; font-family: var(--basic-font); white-space: pre; + pointer-events: none; } .code_ac { @@ -1292,7 +1293,7 @@ button:disabled { .pcnode:hover { height: 122px; - background-color: var(--dark-transparent-bg); + background-color: var(--lighter-background); } .pcnode { @@ -1324,7 +1325,7 @@ button:disabled { .pcnode .pcnode_notes { flex: 1; - background-color: var(--dark-transparent-bg); + background-color: var(--lighter-background); padding: 5px; margin: 0; z-index: 1; @@ -1514,6 +1515,8 @@ button:disabled { top: 0.5em; width: 1.5em !important; height: 1.5em !important; + background-image: url(img/close.png); + background-size:contain; } .popup_menu .awesomplete>input { diff --git a/app/js/dataaccess.js b/app/js/dataaccess.js index a5650e7..6ffc59d 100644 --- a/app/js/dataaccess.js +++ b/app/js/dataaccess.js @@ -19,6 +19,8 @@ const defaultTokenPath = pathModule.join(app.getPath("userData"), "data", "mapto const defaultEffectPath = pathModule.join(app.getPath("userData"), "data", "maptool_effects"); const conditionImagePath = pathModule.join(app.getPath("userData"), "data", "condition_images"); const conditionResourcePath = pathModule.join(app.getAppPath(), 'app', 'mappingTool', 'tokens', 'conditions'); + + module.exports = function () { var isFirstTimeLoading = false; function initializeData() { @@ -163,15 +165,13 @@ module.exports = function () { return baseGet("homebrew.json", callback); } - function addHomebrew(dataList, overwrite, callback){ - getHomebrewMonsters(hbData=> { - if(overwrite){ - console.log("Conflicts"); - console.log(hbData.filter(x=> dataList.find(y=> y.name == x.name))); - hbData = hbData.filter(x=> !dataList.find(y=> y.name == x.name)); + function addHomebrew(dataList, overwrite, callback) { + getHomebrewMonsters(hbData => { + if (overwrite) { + hbData = hbData.filter(x => !dataList.find(y => y.name == x.name)); } hbData = hbData.concat(dataList); - setHomebrewMonsters(hbData, callback); + setHomebrewMonsters(hbData, callback); }); } function setHomebrewMonsters(data, callback) { @@ -460,7 +460,8 @@ module.exports = function () { function checkIfFirstTimeLoadComplete() { var baseFolder = pathModule.join(app.getPath("userData"), "data"); - if (!fs.existsSync(baseFolder)) initializeData(); + if (!fs.existsSync(baseFolder)) + initializeData(); } function saveCoverImage(path) { @@ -492,7 +493,7 @@ module.exports = function () { setMonsters: setMonsters, getHomebrewMonsters: getHomebrewMonsters, setHomebrewMonsters: setHomebrewMonsters, - addHomebrew:addHomebrew, + addHomebrew: addHomebrew, getHomebrewAndMonsters: getHomebrewAndMonsters, getEncounters: getEncounters, setEncounters: setEncounters, diff --git a/app/mappingTool/mapscript.js b/app/mappingTool/mapscript.js index 8c63f10..8074a86 100644 --- a/app/mappingTool/mapscript.js +++ b/app/mappingTool/mapscript.js @@ -1081,7 +1081,7 @@ var MAP_RESIZE_BUFFER = 0, LAST_MAP_RESIZE, onZoomCallback; */ function zoomIntoMap(event, resizeAmount, onZoomed) { - console.log(`Zoom ${resizeAmount}`) + if(onZoomed) onZoomCallback = onZoomed; window.requestAnimationFrame(function (ts) { diff --git a/data/spells.json b/data/spells.json index efc01e5..16abce5 100644 --- a/data/spells.json +++ b/data/spells.json @@ -9677,7 +9677,15 @@ "casting_time": "1 action", "duration": "Concentration, up to 1 minute", "ritual": false, - "id": "cacvjpc94kgy0yg4f" + "id": "cacvjpc94kgy0yg4f", + "metadata": { + "savingThrow": [ + "dexterity" + ], + "conditionInflict": [ + "restrained" + ] + } }, { "name": "Find Greater Steed",