diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..036972200 --- /dev/null +++ b/.gitignore @@ -0,0 +1,23 @@ +# app directory exclusions +/app/locale/* +/app/combined* +/app/*.out +/app/*.html +/app/thirdparty/*/ +/app/*.js +/app/*.wasm +/app/wpd* + +# electron directory exclusions +/electron/node_modules/ +/electron/package-lock.json + +# webserver directory exclusions +/webserver/settings.json +/webserver/webserver + +# generated directories +/WebPlotDigitizer-* + +# general +.DS_Store diff --git a/app/javascript/controllers/appData.js b/app/javascript/controllers/appData.js index eb4525bd6..a5a5c4656 100644 --- a/app/javascript/controllers/appData.js +++ b/app/javascript/controllers/appData.js @@ -25,10 +25,14 @@ var wpd = wpd || {}; wpd.appData = (function() { let _plotData = null; let _undoManager = null; + let _pageManager = null; function reset() { _plotData = null; _undoManager = null; + if (_pageManager !== null) { + _pageManager = _pageManager.destroy() + } } function getPlotData() { @@ -39,25 +43,52 @@ wpd.appData = (function() { } function getUndoManager() { - if (_undoManager == null) { - _undoManager = new wpd.UndoManager(); + if (isMultipage()) { + let currentPage = _pageManager.currentPage(); + if (_undoManager === null) { + _undoManager = {}; + } + if (!_undoManager.hasOwnProperty(currentPage)) { + _undoManager[currentPage] = new wpd.UndoManager(); + } + return _undoManager[currentPage]; + } else { + if (_undoManager == null) { + _undoManager = new wpd.UndoManager(); + } + return _undoManager; } - return _undoManager; + } + + function getPageManager() { + return _pageManager; } function isAligned() { return getPlotData().getAxesCount() > 0; } - function plotLoaded(imageData) { + function isMultipage() { + const pageManager = getPageManager(); + if (!pageManager) return false; + return pageManager.pageCount() > 1; + } + + function plotLoaded(imageData, pageManager) { + if (_pageManager === null && pageManager !== null) { + _pageManager = pageManager; + } getPlotData().setTopColors(wpd.colorAnalyzer.getTopColors(imageData)); + getUndoManager().reapply(); } return { isAligned: isAligned, + isMultipage: isMultipage, getPlotData: getPlotData, getUndoManager: getUndoManager, + getPageManager: getPageManager, reset: reset, plotLoaded: plotLoaded }; -})(); \ No newline at end of file +})(); diff --git a/app/javascript/controllers/axesCalibration.js b/app/javascript/controllers/axesCalibration.js index 913d2fac6..88ed5a8da 100644 --- a/app/javascript/controllers/axesCalibration.js +++ b/app/javascript/controllers/axesCalibration.js @@ -95,7 +95,8 @@ wpd.XYAxesCalibrator = class extends wpd.AxesCalibrator { if (!this._isEditing) { axes.name = wpd.alignAxes.makeAxesName(wpd.XYAxes); let plot = wpd.appData.getPlotData(); - plot.addAxes(axes); + plot.addAxes(axes, wpd.appData.isMultipage()); + wpd.alignAxes.postProcessAxesAdd(axes); } wpd.popup.close('xyAlignment'); return true; @@ -147,7 +148,8 @@ wpd.BarAxesCalibrator = class extends wpd.AxesCalibrator { if (!this._isEditing) { axes.name = wpd.alignAxes.makeAxesName(wpd.BarAxes); let plot = wpd.appData.getPlotData(); - plot.addAxes(axes); + plot.addAxes(axes, wpd.appData.isMultipage()); + wpd.alignAxes.postProcessAxesAdd(axes); } wpd.popup.close('barAlignment'); return true; @@ -204,7 +206,8 @@ wpd.PolarAxesCalibrator = class extends wpd.AxesCalibrator { if (!this._isEditing) { axes.name = wpd.alignAxes.makeAxesName(wpd.PolarAxes); let plot = wpd.appData.getPlotData(); - plot.addAxes(axes); + plot.addAxes(axes, wpd.appData.isMultipage()); + wpd.alignAxes.postProcessAxesAdd(axes); } wpd.popup.close('polarAlignment'); return true; @@ -250,7 +253,8 @@ wpd.TernaryAxesCalibrator = class extends wpd.AxesCalibrator { if (!this._isEditing) { axes.name = wpd.alignAxes.makeAxesName(wpd.TernaryAxes); let plot = wpd.appData.getPlotData(); - plot.addAxes(axes); + plot.addAxes(axes, wpd.appData.isMultipage()); + wpd.alignAxes.postProcessAxesAdd(axes); } wpd.popup.close('ternaryAlignment'); return true; @@ -290,7 +294,8 @@ wpd.MapAxesCalibrator = class extends wpd.AxesCalibrator { if (!this._isEditing) { axes.name = wpd.alignAxes.makeAxesName(wpd.MapAxes); let plot = wpd.appData.getPlotData(); - plot.addAxes(axes); + plot.addAxes(axes, wpd.appData.isMultipage()); + wpd.alignAxes.postProcessAxesAdd(axes); } wpd.popup.close('mapAlignment'); return true; @@ -347,11 +352,17 @@ wpd.alignAxes = (function() { var imageAxes = new wpd.ImageAxes(); imageAxes.name = wpd.alignAxes.makeAxesName(wpd.ImageAxes); imageAxes.calibrate(); - wpd.appData.getPlotData().addAxes(imageAxes); + wpd.appData.getPlotData().addAxes(imageAxes, wpd.appData.isMultipage()); + postProcessAxesAdd(imageAxes); wpd.tree.refresh(); let dsNameColl = wpd.appData.getPlotData().getDatasetNames(); if (dsNameColl.length > 0) { - let dsName = dsNameColl[0]; + let dsName; + if (wpd.appData.isMultipage()) { + dsName = dsNameColl[dsNameColl.length - 1]; + } else { + dsName = dsNameColl[0]; + } wpd.tree.selectPath("/" + wpd.gettext("datasets") + "/" + dsName, true); } wpd.acquireData.load(); @@ -438,6 +449,9 @@ wpd.alignAxes = (function() { const plotData = wpd.appData.getPlotData(); const axes = wpd.tree.getActiveAxes(); plotData.deleteAxes(axes); + if (wpd.appData.isMultipage()) { + wpd.appData.getPageManager().deleteAxesFromCurrentPage(axes); + } wpd.tree.refresh(); wpd.tree.selectPath("/" + wpd.gettext("axes")); }); @@ -500,6 +514,14 @@ wpd.alignAxes = (function() { return fullName; } + function postProcessAxesAdd(axes) { + if (wpd.appData.isMultipage()) { + const pageManager = wpd.appData.getPageManager(); + pageManager.addAxesToCurrentPage(axes); + pageManager.autoAddDataset(); + } + } + return { start: initiatePlotAlignment, calibrationCompleted: calibrationCompleted, @@ -514,6 +536,7 @@ wpd.alignAxes = (function() { showRenameAxes: showRenameAxes, makeAxesName: makeAxesName, renameAxes: renameAxes, - renameKeypress: renameKeypress + renameKeypress: renameKeypress, + postProcessAxesAdd: postProcessAxesAdd }; -})(); \ No newline at end of file +})(); diff --git a/app/javascript/controllers/datasetManagement.js b/app/javascript/controllers/datasetManagement.js index 7ba49d47c..b042e6a2f 100644 --- a/app/javascript/controllers/datasetManagement.js +++ b/app/javascript/controllers/datasetManagement.js @@ -31,6 +31,18 @@ wpd.dataSeriesManagement = (function() { return false; } + function getDatasetWithNameCount(name) { + const plotData = wpd.appData.getPlotData(); + const dsNameColl = plotData.getDatasetNames(); + let counter = 0; + for (const dsName of dsNameColl) { + if (dsName.startsWith(name)) { + counter++; + } + } + return counter; + } + function getDatasetCount() { const plotData = wpd.appData.getPlotData(); return plotData.getDatasetCount(); @@ -95,6 +107,9 @@ wpd.dataSeriesManagement = (function() { let ds = new wpd.Dataset(); ds.name = $singleDatasetName.value.trim(); plotData.addDataset(ds); + if (wpd.appData.isMultipage()) { + wpd.appData.getPageManager().addDatasetToCurrentPage(ds); + } wpd.tree.refreshPreservingSelection(); } @@ -104,6 +119,8 @@ wpd.dataSeriesManagement = (function() { wpd.popup.close('add-dataset-popup'); if (dsCount > 0) { const plotData = wpd.appData.getPlotData(); + const isMultipage = wpd.appData.isMultipage(); + const pageManager = wpd.appData.getPageManager(); let idx = getDatasetCount(); const prefix = wpd.gettext("dataset") + " "; let i = 0; @@ -113,6 +130,9 @@ wpd.dataSeriesManagement = (function() { let ds = new wpd.Dataset(); ds.name = dsName; plotData.addDataset(ds); + if (isMultipage) { + pageManager.addDatasetToCurrentPage(ds); + } i++; } idx++; @@ -133,6 +153,9 @@ wpd.dataSeriesManagement = (function() { const plotData = wpd.appData.getPlotData(); const ds = wpd.tree.getActiveDataset(); plotData.deleteDataset(ds); + if (wpd.appData.isMultipage()) { + wpd.appData.getPageManager().deleteDatasetFromCurrentPage(ds); + } wpd.tree.refresh(); wpd.tree.selectPath("/" + wpd.gettext("datasets")); }); @@ -156,8 +179,7 @@ wpd.dataSeriesManagement = (function() { color: wpd.tree.getActiveDataset().colorRGB.getRGB(), triggerElementId: 'dataset-display-color-picker-button', title: 'Specify Display Color for Digitized Points', - setColorDelegate: function( - col) { + setColorDelegate: function(col) { wpd.tree.getActiveDataset().colorRGB = new wpd.Color(col[0], col[1], col[2]); wpd.graphicsWidget.forceHandlerRepaint(); wpd.tree.refreshPreservingSelection(); @@ -175,6 +197,7 @@ wpd.dataSeriesManagement = (function() { addMultipleDatasets: addMultipleDatasets, deleteDataset: deleteDataset, changeAxes: changeAxes, - startColorPicker: startColorPicker + startColorPicker: startColorPicker, + getDatasetWithNameCount: getDatasetWithNameCount }; -})(); \ No newline at end of file +})(); diff --git a/app/javascript/controllers/imageEditing.js b/app/javascript/controllers/imageEditing.js index 82b415250..790003274 100644 --- a/app/javascript/controllers/imageEditing.js +++ b/app/javascript/controllers/imageEditing.js @@ -23,9 +23,14 @@ var wpd = wpd || {}; wpd.imageEditing = { showImageInfo: function() { - let $imageDimensions = document.getElementById("image-info-dimensions"); + let $imageDimensions = document.getElementById('image-info-dimensions'); let imageInfo = wpd.imageManager.getImageInfo(); - $imageDimensions.innerHTML = "(" + imageInfo.width + "x" + imageInfo.height + ")"; + $imageDimensions.innerHTML = '(' + imageInfo.width + 'x' + imageInfo.height + ')'; + + if (wpd.appData.isMultipage()) { + let $imagePages = document.getElementById('image-info-pages'); + $imagePages.innerHTML = wpd.appData.getPageManager().pageCount(); + } wpd.popup.show('image-info-popup'); }, @@ -104,4 +109,4 @@ wpd.CropImageAction = class extends wpd.ReversibleAction { // call all dependent UI elements wpd.graphicsWidget.runImageOp(imageOp); } -}; \ No newline at end of file +}; diff --git a/app/javascript/controllers/imageManager.js b/app/javascript/controllers/imageManager.js index d935feda5..01c2a7fe7 100644 --- a/app/javascript/controllers/imageManager.js +++ b/app/javascript/controllers/imageManager.js @@ -23,6 +23,8 @@ var wpd = wpd || {}; wpd.imageManager = (function() { let _firstLoad = true; + let _newLoad = false; + let _pageManager = null; let _imageInfo = { width: 0, height: 0 @@ -43,6 +45,7 @@ wpd.imageManager = (function() { function loadFromFile(imageFile, resumedProject) { return new Promise((resolve, reject) => { + _newLoad = true; if (imageFile.type.match("image.*")) { wpd.busyNote.show(); let reader = new FileReader(); @@ -57,28 +60,8 @@ wpd.imageManager = (function() { reader.onload = function() { let pdfurl = reader.result; pdfjsLib.getDocument(pdfurl).promise.then(function(pdf) { - pdf.getPage(1).then(function(page) { - let scale = 3; - let viewport = page.getViewport({scale: scale}); - let $canvas = document.createElement('canvas'); - let ctx = $canvas.getContext('2d'); - $canvas.width = viewport.width; - $canvas.height = viewport.height; - page.render({ - canvasContext: ctx, - viewport: viewport - }) - .promise.then( - function() { - let url = $canvas.toDataURL(); - loadFromURL(url, resumedProject).then(resolve); - }, - function(err) { - console.log(err); - wpd.busyNote.close(); - reject(err); - }); - }); + _pageManager = new wpd.PDFManager(pdf); + _pageManager.renderPage(1, resumedProject).then(resolve); }); }; reader.readAsDataURL(imageFile); @@ -102,19 +85,26 @@ wpd.imageManager = (function() { } function _setImage(image, resumedProject) { - wpd.appData.reset(); - wpd.sidebar.clear(); + if (_newLoad) { + wpd.appData.reset(); + wpd.sidebar.clear(); + } let imageData = wpd.graphicsWidget.loadImage(image); - wpd.appData.plotLoaded(imageData); + wpd.appData.plotLoaded(imageData, _pageManager); + _pageManager = null; wpd.busyNote.close(); - wpd.tree.refresh(); - + if (_newLoad) { + wpd.tree.refresh(); + } else { + wpd.tree.refreshPreservingSelection(); + } if (_firstLoad) { wpd.sidebar.show('start-sidebar'); } else if (!resumedProject) { wpd.popup.show('axesList'); } _firstLoad = false; + _newLoad = false; _imageInfo = { width: imageData.width, height: imageData.height diff --git a/app/javascript/controllers/measurements.js b/app/javascript/controllers/measurements.js index ae9471635..ec363f0b1 100644 --- a/app/javascript/controllers/measurements.js +++ b/app/javascript/controllers/measurements.js @@ -30,13 +30,39 @@ wpd.measurementModes = { sidebarId: 'measure-distances-sidebar', init: function() { let plotData = wpd.appData.getPlotData(); - if (plotData.getMeasurementsByType(wpd.DistanceMeasurement).length == 0) { - plotData.addMeasurement(new wpd.DistanceMeasurement()); + if (wpd.appData.isMultipage()) { + const pageManager = wpd.appData.getPageManager(); + const pageDistanceMeasurements = pageManager.filterToCurrentPageMeasurements( + plotData.getMeasurementsByType(wpd.DistanceMeasurement) + ); + if (pageDistanceMeasurements.length == 0) { + const ms = new wpd.DistanceMeasurement(); + plotData.addMeasurement(ms, true); + const pageAxes = pageManager.getCurrentPageAxes(); + if (pageAxes.length > 0) { + for (let i = pageAxes.length - 1; i > -1; i--) { + if (pageAxes[i] instanceof wpd.MapAxes || pageAxes[i] instanceof wpd.ImageAxes) { + plotData.setAxesForMeasurement(ms, pageAxes[i]); + break; + } + } + } + pageManager.addMeasurementToCurrentPage(ms); + } + } else { + if (plotData.getMeasurementsByType(wpd.DistanceMeasurement).length == 0) { + plotData.addMeasurement(new wpd.DistanceMeasurement()); + } } }, clear: function() { let plotData = wpd.appData.getPlotData(); let distMeasures = plotData.getMeasurementsByType(wpd.DistanceMeasurement); + if (wpd.appData.isMultipage()) { + const pageManager = wpd.appData.getPageManager(); + distMeasures = pageManager.filterToCurrentPageMeasurements(distMeasures); + pageManager.deleteMeasurementsFromCurrentPage(distMeasures); + } distMeasures.forEach(m => { m.clearAll(); }); @@ -44,16 +70,29 @@ wpd.measurementModes = { getData: function() { let plotData = wpd.appData.getPlotData(); let distMeasures = plotData.getMeasurementsByType(wpd.DistanceMeasurement); + if (wpd.appData.isMultipage()) { + const pageManager = wpd.appData.getPageManager(); + distMeasures = pageManager.filterToCurrentPageMeasurements(distMeasures); + } return distMeasures[0]; }, getAxes: function() { let plotData = wpd.appData.getPlotData(); let distMeasures = plotData.getMeasurementsByType(wpd.DistanceMeasurement); + if (wpd.appData.isMultipage()) { + const pageManager = wpd.appData.getPageManager(); + distMeasures = pageManager.filterToCurrentPageMeasurements(distMeasures); + } return plotData.getAxesForMeasurement(distMeasures[0]); }, changeAxes: function(axIdx) { let plotData = wpd.appData.getPlotData(); - let ms = plotData.getMeasurementsByType(wpd.DistanceMeasurement)[0]; + let distMeasures = plotData.getMeasurementsByType(wpd.DistanceMeasurement); + if (wpd.appData.isMultipage()) { + const pageManager = wpd.appData.getPageManager(); + distMeasures = pageManager.filterToCurrentPageMeasurements(distMeasures); + } + let ms = distMeasures[0]; let axesColl = plotData.getAxesColl(); if (axIdx == -1) { plotData.setAxesForMeasurement(ms, null); @@ -71,13 +110,30 @@ wpd.measurementModes = { sidebarId: 'measure-angles-sidebar', init: function() { let plotData = wpd.appData.getPlotData(); - if (plotData.getMeasurementsByType(wpd.AngleMeasurement).length == 0) { - plotData.addMeasurement(new wpd.AngleMeasurement()); + if (wpd.appData.isMultipage()) { + const pageManager = wpd.appData.getPageManager(); + const pageAngleMeasurements = pageManager.filterToCurrentPageMeasurements( + plotData.getMeasurementsByType(wpd.AngleMeasurement) + ); + if (pageAngleMeasurements.length == 0) { + const ms = new wpd.AngleMeasurement(); + plotData.addMeasurement(ms, true); + pageManager.addMeasurementToCurrentPage(ms); + } + } else { + if (plotData.getMeasurementsByType(wpd.AngleMeasurement).length == 0) { + plotData.addMeasurement(new wpd.AngleMeasurement()); + } } }, clear: function() { let plotData = wpd.appData.getPlotData(); let angleMeasures = plotData.getMeasurementsByType(wpd.AngleMeasurement); + if (wpd.appData.isMultipage()) { + const pageManager = wpd.appData.getPageManager(); + angleMeasures = pageManager.filterToCurrentPageMeasurements(angleMeasures); + pageManager.deleteMeasurementsFromCurrentPage(angleMeasures); + } angleMeasures.forEach(m => { m.clearAll(); }); @@ -85,6 +141,10 @@ wpd.measurementModes = { getData: function() { let plotData = wpd.appData.getPlotData(); let angleMeasures = plotData.getMeasurementsByType(wpd.AngleMeasurement); + if (wpd.appData.isMultipage()) { + const pageManager = wpd.appData.getPageManager(); + angleMeasures = pageManager.filterToCurrentPageMeasurements(angleMeasures); + } return angleMeasures[0]; } }, @@ -96,13 +156,30 @@ wpd.measurementModes = { sidebarId: 'measure-area-sidebar', init: function() { let plotData = wpd.appData.getPlotData(); - if (plotData.getMeasurementsByType(wpd.AreaMeasurement).length == 0) { - plotData.addMeasurement(new wpd.AreaMeasurement()); + if (wpd.appData.isMultipage()) { + const pageManager = wpd.appData.getPageManager(); + const pageAreaMeasurements = pageManager.filterToCurrentPageMeasurements( + plotData.getMeasurementsByType(wpd.AreaMeasurement) + ); + if (pageAreaMeasurements.length == 0) { + const ms = new wpd.AreaMeasurement(); + plotData.addMeasurement(ms, true); + pageManager.addMeasurementToCurrentPage(ms); + } + } else { + if (plotData.getMeasurementsByType(wpd.AreaMeasurement).length == 0) { + plotData.addMeasurement(new wpd.AreaMeasurement()); + } } }, clear: function() { let plotData = wpd.appData.getPlotData(); let areaMeasures = plotData.getMeasurementsByType(wpd.AreaMeasurement); + if (wpd.appData.isMultipage()) { + const pageManager = wpd.appData.getPageManager(); + areaMeasures = pageManager.filterToCurrentPageMeasurements(areaMeasures); + pageManager.deleteMeasurementsFromCurrentPage(areaMeasures); + } areaMeasures.forEach(m => { m.clearAll(); }); @@ -110,16 +187,29 @@ wpd.measurementModes = { getData: function() { let plotData = wpd.appData.getPlotData(); let areaMeasures = plotData.getMeasurementsByType(wpd.AreaMeasurement); + if (wpd.appData.isMultipage()) { + const pageManager = wpd.appData.getPageManager(); + areaMeasures = pageManager.filterToCurrentPageMeasurements(areaMeasures); + } return areaMeasures[0]; }, getAxes: function() { let plotData = wpd.appData.getPlotData(); let areaMeasures = plotData.getMeasurementsByType(wpd.AreaMeasurement); + if (wpd.appData.isMultipage()) { + const pageManager = wpd.appData.getPageManager(); + areaMeasures = pageManager.filterToCurrentPageMeasurements(areaMeasures); + } return plotData.getAxesForMeasurement(areaMeasures[0]); }, changeAxes: function(axIdx) { let plotData = wpd.appData.getPlotData(); - let ms = plotData.getMeasurementsByType(wpd.AreaMeasurement)[0]; + let areaMeasures = plotData.getMeasurementsByType(wpd.AreaMeasurement); + if (wpd.appData.isMultipage()) { + const pageManager = wpd.appData.getPageManager(); + areaMeasures = pageManager.filterToCurrentPageMeasurements(areaMeasures); + } + let ms = areaMeasures[0]; let axesColl = plotData.getAxesColl(); if (axIdx == -1) { plotData.setAxesForMeasurement(ms, null); @@ -172,4 +262,4 @@ wpd.measurement = (function() { clearAll: clearAll, changeAxes: changeAxes }; -})(); \ No newline at end of file +})(); diff --git a/app/javascript/controllers/undoManager.js b/app/javascript/controllers/undoManager.js index 6fbdc544e..6c7b26e38 100644 --- a/app/javascript/controllers/undoManager.js +++ b/app/javascript/controllers/undoManager.js @@ -55,6 +55,17 @@ wpd.UndoManager = class { this.updateUI(); } + reapply() { + if (!this.canUndo()) { + return; + } + for (let i = 0; i < this._actionIndex; i++) { + let action = this._actions[i]; + action.execute(); + } + this.updateUI(); + } + insertAction(action) { if (!(action instanceof wpd.ReversibleAction)) { console.error("action must be a wpd.ReversibleAction!"); @@ -92,4 +103,4 @@ wpd.UndoManager = class { $redo.disabled = true; } } -}; \ No newline at end of file +}; diff --git a/app/javascript/core/axes/bar.js b/app/javascript/core/axes/bar.js index 74fc77054..1279a1253 100644 --- a/app/javascript/core/axes/bar.js +++ b/app/javascript/core/axes/bar.js @@ -169,4 +169,4 @@ wpd.BarAxes = (function() { }; return AxesObj; -})(); \ No newline at end of file +})(); diff --git a/app/javascript/core/axes/image.js b/app/javascript/core/axes/image.js index 88edc184d..d477ee4ce 100644 --- a/app/javascript/core/axes/image.js +++ b/app/javascript/core/axes/image.js @@ -71,4 +71,4 @@ wpd.ImageAxes = (function() { }; return AxesObj; -})(); \ No newline at end of file +})(); diff --git a/app/javascript/core/axes/map.js b/app/javascript/core/axes/map.js index 27e3cd49b..bacdf5c19 100644 --- a/app/javascript/core/axes/map.js +++ b/app/javascript/core/axes/map.js @@ -112,4 +112,4 @@ wpd.MapAxes = (function() { }; return AxesObj; -})(); \ No newline at end of file +})(); diff --git a/app/javascript/core/axes/polar.js b/app/javascript/core/axes/polar.js index 1c65b472f..ce2d51511 100644 --- a/app/javascript/core/axes/polar.js +++ b/app/javascript/core/axes/polar.js @@ -192,4 +192,4 @@ wpd.PolarAxes = (function() { }; return AxesObj; -})(); \ No newline at end of file +})(); diff --git a/app/javascript/core/axes/ternary.js b/app/javascript/core/axes/ternary.js index 31e8c9a03..eb32b3e90 100644 --- a/app/javascript/core/axes/ternary.js +++ b/app/javascript/core/axes/ternary.js @@ -171,4 +171,4 @@ wpd.TernaryAxes = (function() { }; return AxesObj; -})(); \ No newline at end of file +})(); diff --git a/app/javascript/core/axes/xy.js b/app/javascript/core/axes/xy.js index c0e05dcd6..8d1053868 100644 --- a/app/javascript/core/axes/xy.js +++ b/app/javascript/core/axes/xy.js @@ -289,4 +289,4 @@ wpd.XYAxes = (function() { }; return AxesObj; -})(); \ No newline at end of file +})(); diff --git a/app/javascript/core/connectedPoints.js b/app/javascript/core/connectedPoints.js index 960c57ac2..a5f1da911 100644 --- a/app/javascript/core/connectedPoints.js +++ b/app/javascript/core/connectedPoints.js @@ -27,6 +27,10 @@ wpd.ConnectedPoints = class { this._selectedConnectionIndex = -1; this._selectedPointIndex = -1; this._connectivity = connectivity; + + if (wpd.appData.isMultipage()) { + this.page = 1; + } } addConnection(plist) { @@ -225,4 +229,4 @@ wpd.AreaMeasurement = class extends wpd.ConnectedPoints { return totalDist; } } -}; \ No newline at end of file +}; diff --git a/app/javascript/core/dataset.js b/app/javascript/core/dataset.js index 6643ed9f1..5284d4687 100644 --- a/app/javascript/core/dataset.js +++ b/app/javascript/core/dataset.js @@ -32,7 +32,7 @@ wpd.Dataset = class { this._mkeys = []; // public: - this.name = "Defaut Dataset"; + this.name = 'Default Dataset'; this.variableNames = ['x', 'y']; this.colorRGB = new wpd.Color(200, 0, 0); } @@ -169,4 +169,4 @@ wpd.Dataset = class { getSelectedPixels() { return this._selections; } -}; \ No newline at end of file +}; diff --git a/app/javascript/core/pageManager.js b/app/javascript/core/pageManager.js new file mode 100644 index 000000000..13bf746b8 --- /dev/null +++ b/app/javascript/core/pageManager.js @@ -0,0 +1,269 @@ +/* + WebPlotDigitizer - https://automeris.io/WebPlotDigitizer + + Copyright 2010-2019 Ankit Rohatgi + + This file is part of WebPlotDigitizer. + + WebPlotDIgitizer is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + WebPlotDigitizer is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with WebPlotDigitizer. If not, see . +*/ + +var wpd = wpd || {}; + +wpd.PageManager = class { + constructor(handle) { + this._handle = handle; + this._curPage = 0; + this._minPage = 0; + this._maxPage = 0; + this._axesByPage = {}; + this._datasetsByPage = {}; + this._measurementsByPage = {}; + this._$pageNavInput = document.getElementById('image-page-nav-input'); + this._$pageInfoElements = document.getElementsByClassName('paged'); + this.init(); + } + + init() { + this._curPage = 1; + this._minPage = 0; + this._maxPage = this.pageCount(); + this._$pageNavInput.setAttribute('max', this._maxPage); + this._showPageInfo(); + } + + destroy() { + this._hidePageInfo(); + return null; + } + + get() { + return this._handle; + } + + getPage() {} + + pageCount() { + return 0; + } + + _togglePageInfoDisplay(hide) { + for (const $el of this._$pageInfoElements) $el.hidden = hide; + } + + _showPageInfo() { + this._togglePageInfoDisplay(false); + } + + _hidePageInfo() { + this._togglePageInfoDisplay(true); + } + + currentPage() { + return this._curPage; + } + + previousPage() { + this.goToPage(this._curPage - 1); + } + + nextPage() { + this.goToPage(this._curPage + 1); + } + + goToPage(pageNumber = 1) { + wpd.busyNote.show(); + + if (!this._validatePageNumber(pageNumber)) { + wpd.busyNote.close(); + wpd.messagePopup.show('Error', 'Invalid page number.'); + return false; + } + + const parsedPageNumber = parseInt(pageNumber, 10); + this._curPage = parsedPageNumber; + this._$pageNavInput.value = parsedPageNumber; + + const axesPageMap = this.getAxesByName(); + const hasAxes = Object.keys(axesPageMap).some(name => axesPageMap[name] === parsedPageNumber); + this.renderPage(parsedPageNumber, hasAxes); + } + + _validatePageNumber(pageNumber) { + return pageNumber > this._minPage && pageNumber <= this._maxPage; + } + + _pageRenderer(page, resumedProject, resolve, reject) { + // implementation specific + } + + renderPage(pageNumber, resumedProject) { + return new Promise((resolve, reject) => { + this.getPage(pageNumber).then(page => { + this._pageRenderer(page, resumedProject, resolve, reject); + }); + }); + } + + _getCurrentPageObjects(collection) { + let pageCollection = []; + if (collection[this._curPage]) { + pageCollection = collection[this._curPage]; + } + return pageCollection; + } + + getCurrentPageAxes() { + return this._getCurrentPageObjects(this._axesByPage); + } + + getCurrentPageDatasets() { + return this._getCurrentPageObjects(this._datasetsByPage); + } + + _addToCurrentPage(collection, object) { + if (!collection[this._curPage]) { + collection[this._curPage] = []; + } + collection[this._curPage].push(object); + } + + addAxesToCurrentPage(axes) { + this._addToCurrentPage(this._axesByPage, axes); + } + + addDatasetToCurrentPage(dataset) { + this._addToCurrentPage(this._datasetsByPage, dataset); + } + + addMeasurementToCurrentPage(measurement) { + this._addToCurrentPage(this._measurementsByPage, measurement); + } + + _deleteFromCurrentPage(collection, objects) { + if (!collection[this._curPage]) return; + objects.forEach(object => { + const index = collection[this._curPage].indexOf(object); + if (index > -1) { + collection[this._curPage].splice(index, 1); + } + }); + } + + deleteAxesFromCurrentPage(axes) { + this._deleteFromCurrentPage(this._axesByPage, [axes]); + } + + deleteDatasetFromCurrentPage(dataset) { + this._deleteFromCurrentPage(this._datasetsByPage, [dataset]); + } + + deleteMeasurementsFromCurrentPage(measurements) { + this._deleteFromCurrentPage(this._measurementsByPage, measurements); + } + + autoAddDataset() { + if (this.getCurrentPageAxes().length === 1 && this.getCurrentPageDatasets().length === 0) { + const plotData = wpd.appData.getPlotData(); + const dataset = plotData.createDefaultDataset(); + plotData.addDataset(dataset); + this.addDatasetToCurrentPage(dataset); + } + } + + _getPageMap(object) { + let map = {}; + Object.entries(object).forEach(([pageNumber, collection]) => { + collection.forEach(item => map[item.name] = parseInt(pageNumber, 10)); + }); + return map; + } + + getAxesByName() { + return this._getPageMap(this._axesByPage); + } + + getDatasetsByName() { + return this._getPageMap(this._datasetsByPage); + } + + filterToCurrentPageMeasurements(measurements) { + let filteredMeasurements = []; + if (this._measurementsByPage[this._curPage]) { + filteredMeasurements = measurements.filter(measurement => { + return this._measurementsByPage[this._curPage].indexOf(measurement) > -1; + }); + } + return filteredMeasurements; + } + + _findPageNumberForMeasurement(measurement) { + for (const page in this._measurementsByPage) { + if (this._measurementsByPage[page].indexOf(measurement) > -1) { + return parseInt(page, 10); + } + } + } + + getPageData() { + return { + axes: this.getAxesByName(), + datasets: this.getDatasetsByName(), + measurements: wpd.appData.getPlotData().getMeasurementColl().map(ms => { + return this._findPageNumberForMeasurement(ms); + }) + }; + } + + loadPageData(data) { + this._axesByPage = data.axes; + this._datasetsByPage = data.datasets; + this._measurementsByPage = data.measurements; + } +}; + +wpd.PDFManager = class extends wpd.PageManager { + getPage(pageNumber) { + super.getPage(); + return this._handle.getPage(pageNumber); + } + + pageCount() { + super.pageCount(); + return this._handle.numPages; + } + + _pageRenderer(page, resumedProject, resolve, reject) { + let scale = 3; + let viewport = page.getViewport({scale: scale}); + let $canvas = document.createElement('canvas'); + let ctx = $canvas.getContext('2d'); + $canvas.width = viewport.width; + $canvas.height = viewport.height; + page.render({ + canvasContext: ctx, + viewport: viewport + }) + .promise.then( + function() { + let url = $canvas.toDataURL(); + wpd.imageManager.loadFromURL(url, resumedProject).then(resolve); + }, + function(err) { + console.log(err); + wpd.busyNote.close(); + reject(err); + }); + } +}; diff --git a/app/javascript/core/plotData.js b/app/javascript/core/plotData.js index f92cb00cf..efac2162c 100644 --- a/app/javascript/core/plotData.js +++ b/app/javascript/core/plotData.js @@ -51,12 +51,19 @@ wpd.PlotData = class { return this._topColors; } - addAxes(ax) { + createDefaultDataset() { + let ds = new wpd.Dataset(); + ds.name = 'Default Dataset'; + const count = wpd.dataSeriesManagement.getDatasetWithNameCount(ds.name); + if (count > 0) ds.name += ' ' + (count + 1); + return ds; + } + + addAxes(ax, skipAutoAddDataset) { this._axesColl.push(ax); - if (this._axesColl.length === 1 && this._datasetColl.length === 0) { - let ds = new wpd.Dataset(); - ds.name = "Default Dataset"; - this.addDataset(ds); + + if (!skipAutoAddDataset && this._axesColl.length === 1 && this._datasetColl.length === 0) { + this.addDataset(this.createDefaultDataset()); } } @@ -92,6 +99,7 @@ wpd.PlotData = class { addDataset(ds) { this._datasetColl.push(ds); + // by default bind ds to last axes const axCount = this._axesColl.length; if (axCount > 0) { @@ -116,11 +124,11 @@ wpd.PlotData = class { return this._datasetColl.length; } - addMeasurement(ms) { + addMeasurement(ms, skipAutoAttach) { this._measurementColl.push(ms); - // if this is a distance measurement, then attach to fist existing image or map axes: - if (ms instanceof wpd.DistanceMeasurement && this._axesColl.length > 0) { + // if this is a distance measurement, then attach to first existing image or map axes: + if (!skipAutoAttach && ms instanceof wpd.DistanceMeasurement && this._axesColl.length > 0) { for (let aIdx = 0; aIdx < this._axesColl.length; aIdx++) { if (this._axesColl[aIdx] instanceof wpd.MapAxes || this._axesColl[aIdx] instanceof wpd.ImageAxes) { this.setAxesForMeasurement(ms, this._axesColl[aIdx]); @@ -130,6 +138,10 @@ wpd.PlotData = class { } } + getMeasurementColl() { + return this._measurementColl; + } + getMeasurementsByType(mtype) { let mcoll = []; this._measurementColl.forEach(m => { @@ -305,6 +317,13 @@ wpd.PlotData = class { } _deserializeVersion4(data) { + // collect page data if it exists + let pageData = { + axes: {}, + datasets: {}, + measurements: {} + }; + // axes data if (data.axesColl != null) { for (let axIdx = 0; axIdx < data.axesColl.length; axIdx++) { @@ -367,6 +386,12 @@ wpd.PlotData = class { if (axes != null) { axes.name = axData.name; this._axesColl.push(axes); + if (axData.page) { + if (!pageData.axes[axData.page]) { + pageData.axes[axData.page] = []; + } + pageData.axes[axData.page].push(axes); + } } } } @@ -389,6 +414,13 @@ wpd.PlotData = class { } this._datasetColl.push(ds); + if (dsData.page) { + if (!pageData.datasets[dsData.page]) { + pageData.datasets[dsData.page] = []; + } + pageData.datasets[dsData.page].push(ds); + } + // set axes for this dataset const axIdx = this.getAxesNames().indexOf(dsData.axesName); if (axIdx >= 0) { @@ -429,16 +461,23 @@ wpd.PlotData = class { this.setAxesForMeasurement(ms, this._axesColl[axIdx]); } } - // add connections if (ms != null) { + // add connections for (let cIdx = 0; cIdx < msData.data.length; cIdx++) { ms.addConnection(msData.data[cIdx]); } + + if (msData.page) { + if (!pageData.measurements[msData.page]) { + pageData.measurements[msData.page] = []; + } + pageData.measurements[msData.page].push(ms); + } } } } - return true; + return pageData; } deserialize(data) { @@ -457,7 +496,7 @@ wpd.PlotData = class { } } - serialize() { + serialize(pageData) { let data = {}; data.version = [4, 2]; data.axesColl = []; @@ -469,6 +508,9 @@ wpd.PlotData = class { const axes = this._axesColl[axIdx]; let axData = {}; axData.name = axes.name; + if (pageData) { + axData.page = pageData.axes[axes.name]; + } if (axes instanceof wpd.XYAxes) { axData.type = "XYAxes"; axData.isLogX = axes.isLogX(); @@ -512,6 +554,9 @@ wpd.PlotData = class { const autoDetectionData = this.getAutoDetectionDataForDataset(ds); let dsData = {}; dsData.name = ds.name; + if (pageData) { + dsData.page = pageData.datasets[ds.name]; + } dsData.axesName = axes != null ? axes.name : ""; dsData.metadataKeys = ds.getMetadataKeys(); dsData.colorRGB = ds.colorRGB.serialize(); @@ -545,6 +590,9 @@ wpd.PlotData = class { msData.name = "Area"; msData.axesName = axes != null ? axes.name : ""; } + if (pageData) { + msData.page = pageData.measurements[msIdx]; + } msData.data = []; for (let cIdx = 0; cIdx < ms.connectionCount(); cIdx++) { msData.data.push(ms.getConnectionAt(cIdx)); @@ -553,4 +601,4 @@ wpd.PlotData = class { } return data; } -}; \ No newline at end of file +}; diff --git a/app/javascript/services/saveResume.js b/app/javascript/services/saveResume.js index 9cdd5f225..abdae6f6a 100644 --- a/app/javascript/services/saveResume.js +++ b/app/javascript/services/saveResume.js @@ -32,13 +32,21 @@ wpd.saveResume = (function() { function resumeFromJSON(json_data) { const plotData = wpd.appData.getPlotData(); - plotData.deserialize(json_data); + const pageData = plotData.deserialize(json_data); + if (wpd.appData.isMultipage() && pageData) { + const pageManager = wpd.appData.getPageManager(); + pageManager.loadPageData(pageData); + } wpd.tree.refresh(); } function generateJSON() { const plotData = wpd.appData.getPlotData(); - return JSON.stringify(plotData.serialize()); + let pageData = undefined; + if (wpd.appData.isMultipage()) { + pageData = wpd.appData.getPageManager().getPageData(); + } + return JSON.stringify(plotData.serialize(pageData)); } function stripIllegalCharacters(filename) { @@ -54,32 +62,43 @@ wpd.saveResume = (function() { wpd.popup.close('export-json-window'); } + function _writeAndDownloadTar(projectName, json, imageFile, imageFileName) { + // projectInfo + let projectInfo = + JSON.stringify({ + 'version': [4, 0], + 'json': 'wpd.json', + 'image': imageFileName + }); + + // generate project file + let tarWriter = new tarball.TarWriter(); + tarWriter.addFolder(projectName + '/'); + tarWriter.addTextFile(projectName + '/info.json', projectInfo); + tarWriter.addTextFile(projectName + '/wpd.json', json); + tarWriter.addFile(projectName + '/' + imageFileName, imageFile); + tarWriter.download(projectName + '.tar'); + } + function downloadProject() { // get project name let projectName = - stripIllegalCharacters(document.getElementById("project-name-input").value); + stripIllegalCharacters(document.getElementById('project-name-input').value); // get JSON let json = generateJSON(); // get Image - let imageFile = wpd.graphicsWidget.getImagePNG(); - - // projectInfo - let projectInfo = - JSON.stringify({ - "version": [4, 0], - "json": "wpd.json", - "image": "image.png" + let imageFile, imageFileName; + if (wpd.appData.isMultipage()) { + wpd.busyNote.show(); + wpd.graphicsWidget.getImagePDF().then(imageFile => { + _writeAndDownloadTar(projectName, json, imageFile, 'image.pdf'); + wpd.busyNote.close(); }); - - // generate project file - let tarWriter = new tarball.TarWriter(); - tarWriter.addFolder(projectName + "/"); - tarWriter.addTextFile(projectName + "/info.json", projectInfo); - tarWriter.addTextFile(projectName + "/wpd.json", json); - tarWriter.addFile(projectName + "/image.png", imageFile); - tarWriter.download(projectName + ".tar"); + } else { + _writeAndDownloadTar(projectName, json, wpd.graphicsWidget.getImagePNG(), 'image.png'); + } wpd.popup.close('export-json-window'); } @@ -105,17 +124,22 @@ wpd.saveResume = (function() { tarReader.readFile(file).then( function(fileInfo) { wpd.busyNote.close(); - let infoIndex = fileInfo.findIndex(info => info.name.endsWith("/info.json")); + let infoIndex = fileInfo.findIndex(info => info.name.endsWith('/info.json')); if (infoIndex >= 0) { - let projectName = fileInfo[infoIndex].name.replace("/info.json", ""); - let wpdimage = tarReader.getFileBlob(projectName + "/image.png", "image/png"); - wpdimage.name = "image.png"; - let wpdjson = JSON.parse(tarReader.getTextFile(projectName + "/wpd.json")); + let projectName = fileInfo[infoIndex].name.replace('/info.json', ''); + let wpdimage; + if (fileInfo.findIndex(info => info.name.endsWith('/image.pdf')) >= 0) { + wpdimage = tarReader.getFileBlob(projectName + '/image.pdf', 'application/pdf'); + } else { + wpdimage = tarReader.getFileBlob(projectName + '/image.png', 'image/png'); + wpdimage.name = 'image.png'; + } + let wpdjson = JSON.parse(tarReader.getTextFile(projectName + '/wpd.json')); wpd.imageManager.loadFromFile(wpdimage, true).then(() => { resumeFromJSON(wpdjson); wpd.tree.refresh(); wpd.messagePopup.show(wpd.gettext('import-json'), - wpd.gettext("json-data-loaded")); + wpd.gettext('json-data-loaded')); afterProjectLoaded(); }); } @@ -166,4 +190,4 @@ wpd.saveResume = (function() { read: read, readProjectFile: readProjectFile }; -})(); \ No newline at end of file +})(); diff --git a/app/javascript/tools/imageEditingTools.js b/app/javascript/tools/imageEditingTools.js index 5a7229dd9..7999cec6d 100644 --- a/app/javascript/tools/imageEditingTools.js +++ b/app/javascript/tools/imageEditingTools.js @@ -278,4 +278,4 @@ wpd.CropTool = class { this._drawCropBox(); } } -}; \ No newline at end of file +}; diff --git a/app/javascript/widgets/graphicsWidget.js b/app/javascript/widgets/graphicsWidget.js index aa674089b..4bbc50568 100644 --- a/app/javascript/widgets/graphicsWidget.js +++ b/app/javascript/widgets/graphicsWidget.js @@ -615,6 +615,15 @@ wpd.graphicsWidget = (function() { return imageFile; } + function getImagePDF() { + return wpd.appData.getPageManager().get().getData().then(u8arr => { + return new Blob([u8arr], { + type: 'application/pdf', + encoding: 'utf-8' + }); + }); + } + return { zoomIn: zoomIn, zoomOut: zoomOut, @@ -650,6 +659,7 @@ wpd.graphicsWidget = (function() { saveImage: saveImage, loadImage: loadImage, - getImagePNG: getImagePNG + getImagePNG: getImagePNG, + getImagePDF: getImagePDF }; -})(); \ No newline at end of file +})(); diff --git a/app/javascript/widgets/tree.js b/app/javascript/widgets/tree.js index bb507a21f..dd2c8a495 100644 --- a/app/javascript/widgets/tree.js +++ b/app/javascript/widgets/tree.js @@ -72,7 +72,7 @@ wpd.TreeWidget = class { return (htmlStr); } - // Expected format: + // Expected format: // treeData = ["item0", {"folder0": ["sub-item0", "sub-item1"]}, "item1"] // itemColors = {"path0" : wpd.Color, "path1" : wpd.Color} render(treeData, itemColors) { @@ -181,17 +181,48 @@ wpd.tree = (function() { const plotData = wpd.appData.getPlotData(); // Image item - treeData.push(wpd.gettext("image")); + if (wpd.appData.isMultipage()) { + const pageManager = wpd.appData.getPageManager(); + let imageFolder = {}; + imageFolder[wpd.gettext('image')] = [ + wpd.gettext('image-page') + + ' ' + pageManager.currentPage() + + ' ' + wpd.gettext('image-of') + + ' ' + pageManager.pageCount() + ]; + treeData.push(imageFolder); + } else { + treeData.push(wpd.gettext('image')); + } // Axes folder + const axesNames = plotData.getAxesNames(); let axesFolder = {}; - axesFolder[wpd.gettext("axes")] = plotData.getAxesNames(); + if (wpd.appData.isMultipage()) { + const pageManager = wpd.appData.getPageManager(); + const currentPage = pageManager.currentPage(); + const axesByName = pageManager.getAxesByName(); + axesFolder[wpd.gettext("axes")] = axesNames.filter( + name => axesByName[name] === currentPage + ); + } else { + axesFolder[wpd.gettext("axes")] = axesNames; + } treeData.push(axesFolder); // Datasets folder const datasetNames = plotData.getDatasetNames(); let datasetsFolder = {}; - datasetsFolder[wpd.gettext("datasets")] = datasetNames; + if (wpd.appData.isMultipage()) { + const pageManager = wpd.appData.getPageManager(); + const currentPage = pageManager.currentPage() + const datasetsByName = pageManager.getDatasetsByName(); + datasetsFolder[wpd.gettext("datasets")] = datasetNames.filter( + name => datasetsByName[name] === currentPage + ); + } else { + datasetsFolder[wpd.gettext("datasets")] = datasetNames; + } treeData.push(datasetsFolder); // Dataset colors @@ -206,6 +237,12 @@ wpd.tree = (function() { let distMeasures = plotData.getMeasurementsByType(wpd.DistanceMeasurement); let angleMeasures = plotData.getMeasurementsByType(wpd.AngleMeasurement); let areaMeasures = plotData.getMeasurementsByType(wpd.AreaMeasurement); + if (wpd.appData.isMultipage()) { + const pageManager = wpd.appData.getPageManager(); + distMeasures = pageManager.filterToCurrentPageMeasurements(distMeasures); + angleMeasures = pageManager.filterToCurrentPageMeasurements(angleMeasures); + areaMeasures = pageManager.filterToCurrentPageMeasurements(areaMeasures); + } if (areaMeasures.length > 0) { measurementItems.push(wpd.gettext("area")); } @@ -269,9 +306,19 @@ wpd.tree = (function() { let axesList = []; let datasetList = []; const plotData = wpd.appData.getPlotData(); - for (let ds of plotData.getDatasets()) { - axesList.push(plotData.getAxesForDataset(ds)); - datasetList.push(ds); + if (wpd.appData.isMultipage()) { + const pageManager = wpd.appData.getPageManager(); + const currentPage = pageManager.currentPage(); + const datasetsByName = pageManager.getDatasetsByName(); + for (let ds of plotData.getDatasets().filter(d => datasetsByName[d.name] === currentPage)) { + axesList.push(plotData.getAxesForDataset(ds)); + datasetList.push(ds); + } + } else { + for (let ds of plotData.getDatasets()) { + axesList.push(plotData.getAxesForDataset(ds)); + datasetList.push(ds); + } } wpd.graphicsWidget.setRepainter(new wpd.MultipltDatasetRepainter(axesList, datasetList)); } @@ -283,11 +330,24 @@ wpd.tree = (function() { const axesNames = plotData.getAxesNames(); const dsaxes = plotData.getAxesForDataset(activeDataset); const $selection = document.getElementById("dataset-item-axes-select"); + let innerHTML = ""; - for (let axIdx = 0; axIdx < axesNames.length; axIdx++) { - innerHTML += ""; + if (wpd.appData.isMultipage()) { + const pageManager = wpd.appData.getPageManager(); + const currentPage = pageManager.currentPage(); + const axesByName = pageManager.getAxesByName(); + for (let axIdx = 0; axIdx < axesNames.length; axIdx++) { + if (axesByName[axesNames[axIdx]] === currentPage) { + innerHTML += ""; + } + } + } else { + for (let axIdx = 0; axIdx < axesNames.length; axIdx++) { + innerHTML += ""; + } } $selection.innerHTML = innerHTML; + if (dsaxes == null) { $selection.value = "-1"; } else { @@ -313,24 +373,48 @@ wpd.tree = (function() { } function renderAxesSelectionForMeasurement(mode) { - const isDist = mode == wpd.measurementModes.distance; const plotData = wpd.appData.getPlotData(); - const msColl = isDist ? plotData.getMeasurementsByType(wpd.DistanceMeasurement) : - plotData.getMeasurementsByType(wpd.AreaMeasurement); - if (msColl.length != 1) - return; // only 1 distance or area object is supported right now - const ms = msColl[0]; - const $selection = isDist ? document.getElementById("distance-item-axes-select") : - document.getElementById("area-item-axes-select");; const axesColl = plotData.getAxesColl(); - const axes = plotData.getAxesForMeasurement(ms); + let msColl; + let ms; + const isDist = mode == wpd.measurementModes.distance; let innerHTML = ""; - for (let axIdx = 0; axIdx < axesColl.length; axIdx++) { - if (axesColl[axIdx] instanceof wpd.ImageAxes || axesColl[axIdx] instanceof wpd.MapAxes) { - innerHTML += ""; + if (wpd.appData.isMultipage()) { + const pageManager = wpd.appData.getPageManager(); + msColl = isDist ? plotData.getMeasurementsByType(wpd.DistanceMeasurement) : + plotData.getMeasurementsByType(wpd.AreaMeasurement); + msColl = pageManager.filterToCurrentPageMeasurements(msColl); + ms = msColl[msColl.length - 1]; + const currentPage = pageManager.currentPage(); + const axesByName = pageManager.getAxesByName(); + for (let axIdx = 0; axIdx < axesColl.length; axIdx++) { + if ( + axesByName[axesColl[axIdx].name] === currentPage + && ( + axesColl[axIdx] instanceof wpd.ImageAxes + || axesColl[axIdx] instanceof wpd.MapAxes + ) + ) { + innerHTML += ""; + } + } + } else { + msColl = isDist ? plotData.getMeasurementsByType(wpd.DistanceMeasurement) : + plotData.getMeasurementsByType(wpd.AreaMeasurement); + if (msColl.length != 1) + return; // only 1 distance or area object is supported right now + ms = msColl[0]; + const axesColl = plotData.getAxesColl(); + for (let axIdx = 0; axIdx < axesColl.length; axIdx++) { + if (axesColl[axIdx] instanceof wpd.ImageAxes || axesColl[axIdx] instanceof wpd.MapAxes) { + innerHTML += ""; + } } } + const $selection = isDist ? document.getElementById("distance-item-axes-select") : + document.getElementById("area-item-axes-select"); $selection.innerHTML = innerHTML; + const axes = plotData.getAxesForMeasurement(ms); if (axes == null) { $selection.value = "-1"; } else { @@ -350,24 +434,30 @@ wpd.tree = (function() { $tweakButton.disabled = activeAxes instanceof wpd.ImageAxes ? true : false; } + function onImageSelection(elem, path, suppressSecondaryActions) { + resetGraphics(); + activeAxes = null; + showTreeItemWidget('image-item-tree-widget'); + wpd.sidebar.show('image-editing-sidebar'); + wpd.appData.getUndoManager().updateUI(); + } + function onSelection(elem, path, suppressSecondaryActions) { - if (path === "/" + wpd.gettext("image")) { - resetGraphics(); - activeAxes = null; - showTreeItemWidget("image-item-tree-widget"); - wpd.sidebar.show("image-editing-sidebar"); - wpd.appData.getUndoManager().updateUI(); - } else if (path === "/" + wpd.gettext("datasets")) { + if (path === '/' + wpd.gettext('image')) { + onImageSelection(elem, path, suppressSecondaryActions); + } else if (path.startsWith('/' + wpd.gettext('image') + '/')) { + selectPath('/' + wpd.gettext('image')); + } else if (path === '/' + wpd.gettext('datasets')) { onDatasetGroupSelection(); - showTreeItemWidget("dataset-group-tree-widget"); + showTreeItemWidget('dataset-group-tree-widget'); activeAxes = null; - } else if (path === "/" + wpd.gettext("axes")) { + } else if (path === '/' + wpd.gettext('axes')) { resetGraphics(); - showTreeItemWidget("axes-group-tree-widget"); + showTreeItemWidget('axes-group-tree-widget'); activeAxes = null; - } else if (path === "/" + wpd.gettext("measurements")) { + } else if (path === '/' + wpd.gettext('measurements')) { resetGraphics(); - showTreeItemWidget("measurement-group-tree-widget"); + showTreeItemWidget('measurement-group-tree-widget'); activeAxes = null; } else if (path === '/' + wpd.gettext('measurements') + '/' + wpd.gettext('distance')) { if (!suppressSecondaryActions) { @@ -387,9 +477,9 @@ wpd.tree = (function() { } showTreeItemWidget('area-item-tree-widget'); renderAreaAxesSelection(); - } else if (path.startsWith("/" + wpd.gettext("datasets") + "/")) { + } else if (path.startsWith('/' + wpd.gettext('datasets') + '/')) { onDatasetSelection(elem, path, suppressSecondaryActions); - } else if (path.startsWith("/" + wpd.gettext("axes") + "/")) { + } else if (path.startsWith('/' + wpd.gettext('axes') + '/')) { onAxesSelection(elem, path, suppressSecondaryActions); } else { resetGraphics(); @@ -435,15 +525,17 @@ wpd.tree = (function() { function addMeasurement(mode) { wpd.measurement.start(mode); refresh(); + let suppressSecondaryActions = true; + if (wpd.appData.isMultipage()) suppressSecondaryActions = false; if (mode === wpd.measurementModes.distance) { wpd.tree.selectPath("/" + wpd.gettext("measurements") + "/" + wpd.gettext("distance"), - true); + suppressSecondaryActions); } else if (mode === wpd.measurementModes.angle) { wpd.tree.selectPath("/" + wpd.gettext("measurements") + "/" + wpd.gettext("angle"), - true); + suppressSecondaryActions); } else if (mode === wpd.measurementModes.area) { wpd.tree.selectPath("/" + wpd.gettext("measurements") + "/" + wpd.gettext("area"), - true); + suppressSecondaryActions); } } @@ -464,4 +556,4 @@ wpd.tree = (function() { getActiveDataset: getActiveDataset, getActiveAxes: getActiveAxes }; -})(); \ No newline at end of file +})(); diff --git a/app/locale/de_DE/LC_MESSAGES/messages.po b/app/locale/de_DE/LC_MESSAGES/messages.po index 1fc8b824d..0c38b7338 100644 --- a/app/locale/de_DE/LC_MESSAGES/messages.po +++ b/app/locale/de_DE/LC_MESSAGES/messages.po @@ -167,7 +167,7 @@ msgstr "Aufnahme" #: templates/_popups.html:145 templates/_popups.html:169 #: templates/_popups.html:178 templates/_popups.html:209 #: templates/_popups.html:247 templates/_popups.html:465 -#: templates/_popups.html:478 templates/_popups.html:549 +#: templates/_popups.html:478 templates/_popups.html:550 msgid "OK" msgstr "OK" @@ -318,7 +318,7 @@ msgid "Acquired Data" msgstr "Erlangte Daten" #: templates/_popups.html:258 templates/_strings.html:47 -#: templates/_tree.html:52 +#: templates/_tree.html:57 msgid "Dataset" msgstr "Datensatz" @@ -656,7 +656,7 @@ msgstr "" msgid "Export to Plotly" msgstr "Zu Plotly exportieren" -#: templates/_popups.html:512 templates/_tree.html:37 +#: templates/_popups.html:512 templates/_tree.html:42 msgid "Add Dataset" msgstr "Datensatz hinzufügen" @@ -677,12 +677,12 @@ msgstr "Zähler" msgid "Add Multiple Datasets" msgstr "Mehrere Datensätze hinzufügen" -#: templates/_popups.html:522 templates/_tree.html:56 +#: templates/_popups.html:522 templates/_tree.html:61 msgid "Rename Dataset" msgstr "Datensatz umbenennen" #: templates/_popups.html:527 templates/_popups.html:538 -#: templates/_tree.html:27 +#: templates/_tree.html:32 msgid "Rename" msgstr "Umbenennen" @@ -780,7 +780,7 @@ msgid "Click to change color" msgstr "Klicken Sie um die Farbe ändern" #: templates/_sidebars.html:33 templates/_strings.html:51 -#: templates/_tree.html:45 templates/_tree.html:65 +#: templates/_tree.html:50 templates/_tree.html:70 msgid "Distance" msgstr "Entfernung" @@ -1049,7 +1049,7 @@ msgstr "Verwalten von Datensätzen" msgid "Please calibrate the axes before managing datasets." msgstr "Bitte kalibrieren Sie die Achsen, bevor Sie Datensätze verwalten." -#: templates/_strings.html:27 templates/_tree.html:57 +#: templates/_strings.html:27 templates/_tree.html:62 msgid "Delete Dataset" msgstr "Datensatz löschen" @@ -1133,24 +1133,24 @@ msgstr "" msgid "Specify a valid number of datasets to add!" msgstr "Geben sie eine gültige Nummer hinzuzufügender Datensätze an!" -#: templates/_strings.html:48 templates/_tree.html:35 +#: templates/_strings.html:48 templates/_tree.html:40 msgid "Datasets" msgstr "Datensätze" -#: templates/_strings.html:49 templates/_tree.html:43 +#: templates/_strings.html:49 templates/_tree.html:48 msgid "Measurements" msgstr "Maße" -#: templates/_strings.html:50 templates/_tree.html:15 templates/_tree.html:25 -#: templates/_tree.html:54 templates/_tree.html:67 templates/_tree.html:84 +#: templates/_strings.html:50 templates/_tree.html:20 templates/_tree.html:30 +#: templates/_tree.html:59 templates/_tree.html:72 templates/_tree.html:89 msgid "Axes" msgstr "Achsen" -#: templates/_strings.html:52 templates/_tree.html:46 templates/_tree.html:74 +#: templates/_strings.html:52 templates/_tree.html:51 templates/_tree.html:79 msgid "Angle" msgstr "Winkel" -#: templates/_strings.html:53 templates/_tree.html:47 templates/_tree.html:82 +#: templates/_strings.html:53 templates/_tree.html:52 templates/_tree.html:87 msgid "Area/Perimeter" msgstr "" @@ -1206,60 +1206,80 @@ msgstr "" msgid "Not a valid project file format!" msgstr "" +#: templates/_strings.html:69 +msgid "of" +msgstr "" + +#: templates/_strings.html:70 +msgid "Page" +msgstr "" + #: templates/_toolbars.html:3 msgid "View Keyboard Shortcuts" msgstr "Tastaturbefehle anzeigen" -#: templates/_tree.html:17 +#: templates/_tree.html:11 +msgid "Previous Page" +msgstr "" + +#: templates/_tree.html:12 +msgid "Next Page" +msgstr "" + +#: templates/_tree.html:14 +msgid "Go" +msgstr "" + +#: templates/_tree.html:22 msgid "Add Calibration" msgstr "Kalibrierung hinzufügen" -#: templates/_tree.html:18 +#: templates/_tree.html:23 msgid "Remove Grid" msgstr "Gitter entfernen" -#: templates/_tree.html:19 +#: templates/_tree.html:24 msgid "Import Calibration" msgstr "Kalibrierung importieren" -#: templates/_tree.html:20 +#: templates/_tree.html:25 msgid "Export Calibration" msgstr "Kalibrierung exportieren" -#: templates/_tree.html:28 +#: templates/_tree.html:33 msgid "Tweak Calibration" msgstr "Kalibrierung bearbeiten" -#: templates/_tree.html:29 +#: templates/_tree.html:34 msgid "Delete" msgstr "Löschen" -#: templates/_tree.html:30 +#: templates/_tree.html:35 msgid "View Equations" msgstr "Gleichungen anzeigen" -#: templates/_tree.html:38 +#: templates/_tree.html:43 msgid "Export All Data" msgstr "Alle Daten exportieren" -#: templates/_tree.html:55 +#: templates/_tree.html:60 msgid "Display Color" msgstr "" -#: templates/_tree.html:58 templates/_tree.html:69 templates/_tree.html:77 -#: templates/_tree.html:86 +#: templates/_tree.html:63 templates/_tree.html:74 templates/_tree.html:82 +#: templates/_tree.html:91 msgid "View Data" msgstr "Daten anzeigen" -#: templates/_tree.html:59 +#: templates/_tree.html:64 msgid "Clear Data" msgstr "Daten löschen" -#: templates/_tree.html:60 +#: templates/_tree.html:65 msgid "Data Points" msgstr "Datenpunkte" -#: templates/_tree.html:68 templates/_tree.html:76 templates/_tree.html:85 +#: templates/_tree.html:73 templates/_tree.html:81 templates/_tree.html:90 msgid "Clear All" msgstr "Alle löschen" @@ -1281,3 +1301,21 @@ msgstr "Alle löschen" #~ msgid "WebPlotDigitizer-Examples repository" #~ msgstr "WebPlotDigitizer-Beispiel Repository" +#~ msgid "<<" +#~ msgstr "" + +#~ msgid "<" +#~ msgstr "" + +#~ msgid ">" +#~ msgstr "" + +#~ msgid ">>" +#~ msgstr "" + +#~ msgid "First Page" +#~ msgstr "" + +#~ msgid "Last Page" +#~ msgstr "" + diff --git a/app/locale/en_US/LC_MESSAGES/messages.po b/app/locale/en_US/LC_MESSAGES/messages.po index 919216573..2e23d9a8a 100644 --- a/app/locale/en_US/LC_MESSAGES/messages.po +++ b/app/locale/en_US/LC_MESSAGES/messages.po @@ -161,7 +161,7 @@ msgstr "" #: templates/_popups.html:145 templates/_popups.html:169 #: templates/_popups.html:178 templates/_popups.html:209 #: templates/_popups.html:247 templates/_popups.html:465 -#: templates/_popups.html:478 templates/_popups.html:549 +#: templates/_popups.html:478 templates/_popups.html:550 msgid "OK" msgstr "" @@ -305,7 +305,7 @@ msgid "Acquired Data" msgstr "" #: templates/_popups.html:258 templates/_strings.html:47 -#: templates/_tree.html:52 +#: templates/_tree.html:57 msgid "Dataset" msgstr "" @@ -620,7 +620,7 @@ msgstr "" msgid "Export to Plotly" msgstr "" -#: templates/_popups.html:512 templates/_tree.html:37 +#: templates/_popups.html:512 templates/_tree.html:42 msgid "Add Dataset" msgstr "" @@ -641,12 +641,12 @@ msgstr "" msgid "Add Multiple Datasets" msgstr "" -#: templates/_popups.html:522 templates/_tree.html:56 +#: templates/_popups.html:522 templates/_tree.html:61 msgid "Rename Dataset" msgstr "" #: templates/_popups.html:527 templates/_popups.html:538 -#: templates/_tree.html:27 +#: templates/_tree.html:32 msgid "Rename" msgstr "" @@ -741,7 +741,7 @@ msgid "Click to change color" msgstr "" #: templates/_sidebars.html:33 templates/_strings.html:51 -#: templates/_tree.html:45 templates/_tree.html:65 +#: templates/_tree.html:50 templates/_tree.html:70 msgid "Distance" msgstr "" @@ -997,7 +997,7 @@ msgstr "" msgid "Please calibrate the axes before managing datasets." msgstr "" -#: templates/_strings.html:27 templates/_tree.html:57 +#: templates/_strings.html:27 templates/_tree.html:62 msgid "Delete Dataset" msgstr "" @@ -1077,24 +1077,24 @@ msgstr "" msgid "Specify a valid number of datasets to add!" msgstr "" -#: templates/_strings.html:48 templates/_tree.html:35 +#: templates/_strings.html:48 templates/_tree.html:40 msgid "Datasets" msgstr "" -#: templates/_strings.html:49 templates/_tree.html:43 +#: templates/_strings.html:49 templates/_tree.html:48 msgid "Measurements" msgstr "" -#: templates/_strings.html:50 templates/_tree.html:15 templates/_tree.html:25 -#: templates/_tree.html:54 templates/_tree.html:67 templates/_tree.html:84 +#: templates/_strings.html:50 templates/_tree.html:20 templates/_tree.html:30 +#: templates/_tree.html:59 templates/_tree.html:72 templates/_tree.html:89 msgid "Axes" msgstr "" -#: templates/_strings.html:52 templates/_tree.html:46 templates/_tree.html:74 +#: templates/_strings.html:52 templates/_tree.html:51 templates/_tree.html:79 msgid "Angle" msgstr "" -#: templates/_strings.html:53 templates/_tree.html:47 templates/_tree.html:82 +#: templates/_strings.html:53 templates/_tree.html:52 templates/_tree.html:87 msgid "Area/Perimeter" msgstr "" @@ -1150,60 +1150,80 @@ msgstr "" msgid "Not a valid project file format!" msgstr "" +#: templates/_strings.html:69 +msgid "of" +msgstr "" + +#: templates/_strings.html:70 +msgid "Page" +msgstr "" + #: templates/_toolbars.html:3 msgid "View Keyboard Shortcuts" msgstr "" -#: templates/_tree.html:17 +#: templates/_tree.html:11 +msgid "Previous Page" +msgstr "" + +#: templates/_tree.html:12 +msgid "Next Page" +msgstr "" + +#: templates/_tree.html:14 +msgid "Go" +msgstr "" + +#: templates/_tree.html:22 msgid "Add Calibration" msgstr "" -#: templates/_tree.html:18 +#: templates/_tree.html:23 msgid "Remove Grid" msgstr "" -#: templates/_tree.html:19 +#: templates/_tree.html:24 msgid "Import Calibration" msgstr "" -#: templates/_tree.html:20 +#: templates/_tree.html:25 msgid "Export Calibration" msgstr "" -#: templates/_tree.html:28 +#: templates/_tree.html:33 msgid "Tweak Calibration" msgstr "" -#: templates/_tree.html:29 +#: templates/_tree.html:34 msgid "Delete" msgstr "" -#: templates/_tree.html:30 +#: templates/_tree.html:35 msgid "View Equations" msgstr "" -#: templates/_tree.html:38 +#: templates/_tree.html:43 msgid "Export All Data" msgstr "" -#: templates/_tree.html:55 +#: templates/_tree.html:60 msgid "Display Color" msgstr "" -#: templates/_tree.html:58 templates/_tree.html:69 templates/_tree.html:77 -#: templates/_tree.html:86 +#: templates/_tree.html:63 templates/_tree.html:74 templates/_tree.html:82 +#: templates/_tree.html:91 msgid "View Data" msgstr "" -#: templates/_tree.html:59 +#: templates/_tree.html:64 msgid "Clear Data" msgstr "" -#: templates/_tree.html:60 +#: templates/_tree.html:65 msgid "Data Points" msgstr "" -#: templates/_tree.html:68 templates/_tree.html:76 templates/_tree.html:85 +#: templates/_tree.html:73 templates/_tree.html:81 templates/_tree.html:90 msgid "Clear All" msgstr "" @@ -2247,3 +2267,21 @@ msgstr "" #~ msgid "Clear Data" #~ msgstr "" +#~ msgid "<<" +#~ msgstr "" + +#~ msgid "<" +#~ msgstr "" + +#~ msgid ">" +#~ msgstr "" + +#~ msgid ">>" +#~ msgstr "" + +#~ msgid "First Page" +#~ msgstr "" + +#~ msgid "Last Page" +#~ msgstr "" + diff --git a/app/locale/fr_FR/LC_MESSAGES/messages.po b/app/locale/fr_FR/LC_MESSAGES/messages.po index 05ed170b8..d1d21c5e3 100644 --- a/app/locale/fr_FR/LC_MESSAGES/messages.po +++ b/app/locale/fr_FR/LC_MESSAGES/messages.po @@ -167,7 +167,7 @@ msgstr "Capturer" #: templates/_popups.html:145 templates/_popups.html:169 #: templates/_popups.html:178 templates/_popups.html:209 #: templates/_popups.html:247 templates/_popups.html:465 -#: templates/_popups.html:478 templates/_popups.html:549 +#: templates/_popups.html:478 templates/_popups.html:550 msgid "OK" msgstr "Ok" @@ -319,7 +319,7 @@ msgid "Acquired Data" msgstr "Données acquises" #: templates/_popups.html:258 templates/_strings.html:47 -#: templates/_tree.html:52 +#: templates/_tree.html:57 msgid "Dataset" msgstr "Ensemble de Données" @@ -659,7 +659,7 @@ msgstr "" msgid "Export to Plotly" msgstr "Exporter vers Plotly" -#: templates/_popups.html:512 templates/_tree.html:37 +#: templates/_popups.html:512 templates/_tree.html:42 msgid "Add Dataset" msgstr "Ajouter Dataset" @@ -680,12 +680,12 @@ msgstr "Compte" msgid "Add Multiple Datasets" msgstr "Ajouter plusieurs Datasets" -#: templates/_popups.html:522 templates/_tree.html:56 +#: templates/_popups.html:522 templates/_tree.html:61 msgid "Rename Dataset" msgstr "Renommer Dataset" #: templates/_popups.html:527 templates/_popups.html:538 -#: templates/_tree.html:27 +#: templates/_tree.html:32 msgid "Rename" msgstr "Renommer" @@ -783,7 +783,7 @@ msgid "Click to change color" msgstr "Cliquez pour changer la couleur" #: templates/_sidebars.html:33 templates/_strings.html:51 -#: templates/_tree.html:45 templates/_tree.html:65 +#: templates/_tree.html:50 templates/_tree.html:70 msgid "Distance" msgstr "Distance" @@ -1052,7 +1052,7 @@ msgstr "Gérer Datasets" msgid "Please calibrate the axes before managing datasets." msgstr "Veuillez étalonner les axes avant de gérer les dataset." -#: templates/_strings.html:27 templates/_tree.html:57 +#: templates/_strings.html:27 templates/_tree.html:62 msgid "Delete Dataset" msgstr "Supprimer le Dataset" @@ -1132,24 +1132,24 @@ msgstr "Axes avec ce nom existe déjà. Veuillez choisir un autre nom." msgid "Specify a valid number of datasets to add!" msgstr "Spécifiez un nombre valide de datasets à ajouter!" -#: templates/_strings.html:48 templates/_tree.html:35 +#: templates/_strings.html:48 templates/_tree.html:40 msgid "Datasets" msgstr "Datasets" -#: templates/_strings.html:49 templates/_tree.html:43 +#: templates/_strings.html:49 templates/_tree.html:48 msgid "Measurements" msgstr "Mesures" -#: templates/_strings.html:50 templates/_tree.html:15 templates/_tree.html:25 -#: templates/_tree.html:54 templates/_tree.html:67 templates/_tree.html:84 +#: templates/_strings.html:50 templates/_tree.html:20 templates/_tree.html:30 +#: templates/_tree.html:59 templates/_tree.html:72 templates/_tree.html:89 msgid "Axes" msgstr "Axes" -#: templates/_strings.html:52 templates/_tree.html:46 templates/_tree.html:74 +#: templates/_strings.html:52 templates/_tree.html:51 templates/_tree.html:79 msgid "Angle" msgstr "Angle" -#: templates/_strings.html:53 templates/_tree.html:47 templates/_tree.html:82 +#: templates/_strings.html:53 templates/_tree.html:52 templates/_tree.html:87 msgid "Area/Perimeter" msgstr "" @@ -1205,60 +1205,80 @@ msgstr "" msgid "Not a valid project file format!" msgstr "" +#: templates/_strings.html:69 +msgid "of" +msgstr "" + +#: templates/_strings.html:70 +msgid "Page" +msgstr "" + #: templates/_toolbars.html:3 msgid "View Keyboard Shortcuts" msgstr "Voir les Raccourcis du Clavier" -#: templates/_tree.html:17 +#: templates/_tree.html:11 +msgid "Previous Page" +msgstr "" + +#: templates/_tree.html:12 +msgid "Next Page" +msgstr "" + +#: templates/_tree.html:14 +msgid "Go" +msgstr "" + +#: templates/_tree.html:22 msgid "Add Calibration" msgstr "Ajouter le calibrage" -#: templates/_tree.html:18 +#: templates/_tree.html:23 msgid "Remove Grid" msgstr "Supprimer la Grille" -#: templates/_tree.html:19 +#: templates/_tree.html:24 msgid "Import Calibration" msgstr "Importer le calibrage" -#: templates/_tree.html:20 +#: templates/_tree.html:25 msgid "Export Calibration" msgstr "Export calibrage" -#: templates/_tree.html:28 +#: templates/_tree.html:33 msgid "Tweak Calibration" msgstr "Calibrage tweak" -#: templates/_tree.html:29 +#: templates/_tree.html:34 msgid "Delete" msgstr "Supprimer" -#: templates/_tree.html:30 +#: templates/_tree.html:35 msgid "View Equations" msgstr "Voir les équations" -#: templates/_tree.html:38 +#: templates/_tree.html:43 msgid "Export All Data" msgstr "Exporter toutes les données" -#: templates/_tree.html:55 +#: templates/_tree.html:60 msgid "Display Color" msgstr "" -#: templates/_tree.html:58 templates/_tree.html:69 templates/_tree.html:77 -#: templates/_tree.html:86 +#: templates/_tree.html:63 templates/_tree.html:74 templates/_tree.html:82 +#: templates/_tree.html:91 msgid "View Data" msgstr "Voir les Données" -#: templates/_tree.html:59 +#: templates/_tree.html:64 msgid "Clear Data" msgstr "Effacer les données" -#: templates/_tree.html:60 +#: templates/_tree.html:65 msgid "Data Points" msgstr "Points de Données" -#: templates/_tree.html:68 templates/_tree.html:76 templates/_tree.html:85 +#: templates/_tree.html:73 templates/_tree.html:81 templates/_tree.html:90 msgid "Clear All" msgstr "Effacer Tout" @@ -1283,3 +1303,21 @@ msgstr "Effacer Tout" #~ msgid "WebPlotDigitizer-Examples repository" #~ msgstr "WebPlotDigitizer-Examples Référentiel" +#~ msgid "<<" +#~ msgstr "" + +#~ msgid "<" +#~ msgstr "" + +#~ msgid ">" +#~ msgstr "" + +#~ msgid ">>" +#~ msgstr "" + +#~ msgid "First Page" +#~ msgstr "" + +#~ msgid "Last Page" +#~ msgstr "" + diff --git a/app/locale/ja/LC_MESSAGES/messages.po b/app/locale/ja/LC_MESSAGES/messages.po index fa3f98e90..cd97721e4 100644 --- a/app/locale/ja/LC_MESSAGES/messages.po +++ b/app/locale/ja/LC_MESSAGES/messages.po @@ -161,7 +161,7 @@ msgstr "" #: templates/_popups.html:145 templates/_popups.html:169 #: templates/_popups.html:178 templates/_popups.html:209 #: templates/_popups.html:247 templates/_popups.html:465 -#: templates/_popups.html:478 templates/_popups.html:549 +#: templates/_popups.html:478 templates/_popups.html:550 msgid "OK" msgstr "" @@ -305,7 +305,7 @@ msgid "Acquired Data" msgstr "" #: templates/_popups.html:258 templates/_strings.html:47 -#: templates/_tree.html:52 +#: templates/_tree.html:57 msgid "Dataset" msgstr "" @@ -620,7 +620,7 @@ msgstr "" msgid "Export to Plotly" msgstr "" -#: templates/_popups.html:512 templates/_tree.html:37 +#: templates/_popups.html:512 templates/_tree.html:42 msgid "Add Dataset" msgstr "" @@ -641,12 +641,12 @@ msgstr "" msgid "Add Multiple Datasets" msgstr "" -#: templates/_popups.html:522 templates/_tree.html:56 +#: templates/_popups.html:522 templates/_tree.html:61 msgid "Rename Dataset" msgstr "" #: templates/_popups.html:527 templates/_popups.html:538 -#: templates/_tree.html:27 +#: templates/_tree.html:32 msgid "Rename" msgstr "" @@ -741,7 +741,7 @@ msgid "Click to change color" msgstr "" #: templates/_sidebars.html:33 templates/_strings.html:51 -#: templates/_tree.html:45 templates/_tree.html:65 +#: templates/_tree.html:50 templates/_tree.html:70 msgid "Distance" msgstr "" @@ -997,7 +997,7 @@ msgstr "" msgid "Please calibrate the axes before managing datasets." msgstr "" -#: templates/_strings.html:27 templates/_tree.html:57 +#: templates/_strings.html:27 templates/_tree.html:62 msgid "Delete Dataset" msgstr "" @@ -1077,24 +1077,24 @@ msgstr "" msgid "Specify a valid number of datasets to add!" msgstr "" -#: templates/_strings.html:48 templates/_tree.html:35 +#: templates/_strings.html:48 templates/_tree.html:40 msgid "Datasets" msgstr "" -#: templates/_strings.html:49 templates/_tree.html:43 +#: templates/_strings.html:49 templates/_tree.html:48 msgid "Measurements" msgstr "" -#: templates/_strings.html:50 templates/_tree.html:15 templates/_tree.html:25 -#: templates/_tree.html:54 templates/_tree.html:67 templates/_tree.html:84 +#: templates/_strings.html:50 templates/_tree.html:20 templates/_tree.html:30 +#: templates/_tree.html:59 templates/_tree.html:72 templates/_tree.html:89 msgid "Axes" msgstr "" -#: templates/_strings.html:52 templates/_tree.html:46 templates/_tree.html:74 +#: templates/_strings.html:52 templates/_tree.html:51 templates/_tree.html:79 msgid "Angle" msgstr "" -#: templates/_strings.html:53 templates/_tree.html:47 templates/_tree.html:82 +#: templates/_strings.html:53 templates/_tree.html:52 templates/_tree.html:87 msgid "Area/Perimeter" msgstr "" @@ -1150,60 +1150,80 @@ msgstr "" msgid "Not a valid project file format!" msgstr "" +#: templates/_strings.html:69 +msgid "of" +msgstr "" + +#: templates/_strings.html:70 +msgid "Page" +msgstr "" + #: templates/_toolbars.html:3 msgid "View Keyboard Shortcuts" msgstr "" -#: templates/_tree.html:17 +#: templates/_tree.html:11 +msgid "Previous Page" +msgstr "" + +#: templates/_tree.html:12 +msgid "Next Page" +msgstr "" + +#: templates/_tree.html:14 +msgid "Go" +msgstr "" + +#: templates/_tree.html:22 msgid "Add Calibration" msgstr "" -#: templates/_tree.html:18 +#: templates/_tree.html:23 msgid "Remove Grid" msgstr "" -#: templates/_tree.html:19 +#: templates/_tree.html:24 msgid "Import Calibration" msgstr "" -#: templates/_tree.html:20 +#: templates/_tree.html:25 msgid "Export Calibration" msgstr "" -#: templates/_tree.html:28 +#: templates/_tree.html:33 msgid "Tweak Calibration" msgstr "" -#: templates/_tree.html:29 +#: templates/_tree.html:34 msgid "Delete" msgstr "" -#: templates/_tree.html:30 +#: templates/_tree.html:35 msgid "View Equations" msgstr "" -#: templates/_tree.html:38 +#: templates/_tree.html:43 msgid "Export All Data" msgstr "" -#: templates/_tree.html:55 +#: templates/_tree.html:60 msgid "Display Color" msgstr "" -#: templates/_tree.html:58 templates/_tree.html:69 templates/_tree.html:77 -#: templates/_tree.html:86 +#: templates/_tree.html:63 templates/_tree.html:74 templates/_tree.html:82 +#: templates/_tree.html:91 msgid "View Data" msgstr "" -#: templates/_tree.html:59 +#: templates/_tree.html:64 msgid "Clear Data" msgstr "" -#: templates/_tree.html:60 +#: templates/_tree.html:65 msgid "Data Points" msgstr "" -#: templates/_tree.html:68 templates/_tree.html:76 templates/_tree.html:85 +#: templates/_tree.html:73 templates/_tree.html:81 templates/_tree.html:90 msgid "Clear All" msgstr "" @@ -1912,3 +1932,21 @@ msgstr "" #~ msgid "Rotate" #~ msgstr "" +#~ msgid "<<" +#~ msgstr "" + +#~ msgid "<" +#~ msgstr "" + +#~ msgid ">" +#~ msgstr "" + +#~ msgid ">>" +#~ msgstr "" + +#~ msgid "First Page" +#~ msgstr "" + +#~ msgid "Last Page" +#~ msgstr "" + diff --git a/app/locale/messages.pot b/app/locale/messages.pot index e572677d4..aead90ac5 100644 --- a/app/locale/messages.pot +++ b/app/locale/messages.pot @@ -160,7 +160,7 @@ msgstr "" #: templates/_popups.html:145 templates/_popups.html:169 #: templates/_popups.html:178 templates/_popups.html:209 #: templates/_popups.html:247 templates/_popups.html:465 -#: templates/_popups.html:478 templates/_popups.html:549 +#: templates/_popups.html:478 templates/_popups.html:550 msgid "OK" msgstr "" @@ -304,7 +304,7 @@ msgid "Acquired Data" msgstr "" #: templates/_popups.html:258 templates/_strings.html:47 -#: templates/_tree.html:52 +#: templates/_tree.html:57 msgid "Dataset" msgstr "" @@ -619,7 +619,7 @@ msgstr "" msgid "Export to Plotly" msgstr "" -#: templates/_popups.html:512 templates/_tree.html:37 +#: templates/_popups.html:512 templates/_tree.html:42 msgid "Add Dataset" msgstr "" @@ -640,12 +640,12 @@ msgstr "" msgid "Add Multiple Datasets" msgstr "" -#: templates/_popups.html:522 templates/_tree.html:56 +#: templates/_popups.html:522 templates/_tree.html:61 msgid "Rename Dataset" msgstr "" #: templates/_popups.html:527 templates/_popups.html:538 -#: templates/_tree.html:27 +#: templates/_tree.html:32 msgid "Rename" msgstr "" @@ -740,7 +740,7 @@ msgid "Click to change color" msgstr "" #: templates/_sidebars.html:33 templates/_strings.html:51 -#: templates/_tree.html:45 templates/_tree.html:65 +#: templates/_tree.html:50 templates/_tree.html:70 msgid "Distance" msgstr "" @@ -996,7 +996,7 @@ msgstr "" msgid "Please calibrate the axes before managing datasets." msgstr "" -#: templates/_strings.html:27 templates/_tree.html:57 +#: templates/_strings.html:27 templates/_tree.html:62 msgid "Delete Dataset" msgstr "" @@ -1076,24 +1076,24 @@ msgstr "" msgid "Specify a valid number of datasets to add!" msgstr "" -#: templates/_strings.html:48 templates/_tree.html:35 +#: templates/_strings.html:48 templates/_tree.html:40 msgid "Datasets" msgstr "" -#: templates/_strings.html:49 templates/_tree.html:43 +#: templates/_strings.html:49 templates/_tree.html:48 msgid "Measurements" msgstr "" -#: templates/_strings.html:50 templates/_tree.html:15 templates/_tree.html:25 -#: templates/_tree.html:54 templates/_tree.html:67 templates/_tree.html:84 +#: templates/_strings.html:50 templates/_tree.html:20 templates/_tree.html:30 +#: templates/_tree.html:59 templates/_tree.html:72 templates/_tree.html:89 msgid "Axes" msgstr "" -#: templates/_strings.html:52 templates/_tree.html:46 templates/_tree.html:74 +#: templates/_strings.html:52 templates/_tree.html:51 templates/_tree.html:79 msgid "Angle" msgstr "" -#: templates/_strings.html:53 templates/_tree.html:47 templates/_tree.html:82 +#: templates/_strings.html:53 templates/_tree.html:52 templates/_tree.html:87 msgid "Area/Perimeter" msgstr "" @@ -1149,60 +1149,80 @@ msgstr "" msgid "Not a valid project file format!" msgstr "" +#: templates/_strings.html:69 +msgid "of" +msgstr "" + +#: templates/_strings.html:70 +msgid "Page" +msgstr "" + #: templates/_toolbars.html:3 msgid "View Keyboard Shortcuts" msgstr "" -#: templates/_tree.html:17 +#: templates/_tree.html:11 +msgid "Previous Page" +msgstr "" + +#: templates/_tree.html:12 +msgid "Next Page" +msgstr "" + +#: templates/_tree.html:14 +msgid "Go" +msgstr "" + +#: templates/_tree.html:22 msgid "Add Calibration" msgstr "" -#: templates/_tree.html:18 +#: templates/_tree.html:23 msgid "Remove Grid" msgstr "" -#: templates/_tree.html:19 +#: templates/_tree.html:24 msgid "Import Calibration" msgstr "" -#: templates/_tree.html:20 +#: templates/_tree.html:25 msgid "Export Calibration" msgstr "" -#: templates/_tree.html:28 +#: templates/_tree.html:33 msgid "Tweak Calibration" msgstr "" -#: templates/_tree.html:29 +#: templates/_tree.html:34 msgid "Delete" msgstr "" -#: templates/_tree.html:30 +#: templates/_tree.html:35 msgid "View Equations" msgstr "" -#: templates/_tree.html:38 +#: templates/_tree.html:43 msgid "Export All Data" msgstr "" -#: templates/_tree.html:55 +#: templates/_tree.html:60 msgid "Display Color" msgstr "" -#: templates/_tree.html:58 templates/_tree.html:69 templates/_tree.html:77 -#: templates/_tree.html:86 +#: templates/_tree.html:63 templates/_tree.html:74 templates/_tree.html:82 +#: templates/_tree.html:91 msgid "View Data" msgstr "" -#: templates/_tree.html:59 +#: templates/_tree.html:64 msgid "Clear Data" msgstr "" -#: templates/_tree.html:60 +#: templates/_tree.html:65 msgid "Data Points" msgstr "" -#: templates/_tree.html:68 templates/_tree.html:76 templates/_tree.html:85 +#: templates/_tree.html:73 templates/_tree.html:81 templates/_tree.html:90 msgid "Clear All" msgstr "" diff --git a/app/locale/ru/LC_MESSAGES/messages.po b/app/locale/ru/LC_MESSAGES/messages.po index 8b83315c2..244938a34 100644 --- a/app/locale/ru/LC_MESSAGES/messages.po +++ b/app/locale/ru/LC_MESSAGES/messages.po @@ -162,7 +162,7 @@ msgstr "" #: templates/_popups.html:145 templates/_popups.html:169 #: templates/_popups.html:178 templates/_popups.html:209 #: templates/_popups.html:247 templates/_popups.html:465 -#: templates/_popups.html:478 templates/_popups.html:549 +#: templates/_popups.html:478 templates/_popups.html:550 msgid "OK" msgstr "" @@ -306,7 +306,7 @@ msgid "Acquired Data" msgstr "" #: templates/_popups.html:258 templates/_strings.html:47 -#: templates/_tree.html:52 +#: templates/_tree.html:57 msgid "Dataset" msgstr "" @@ -621,7 +621,7 @@ msgstr "" msgid "Export to Plotly" msgstr "" -#: templates/_popups.html:512 templates/_tree.html:37 +#: templates/_popups.html:512 templates/_tree.html:42 msgid "Add Dataset" msgstr "" @@ -642,12 +642,12 @@ msgstr "" msgid "Add Multiple Datasets" msgstr "" -#: templates/_popups.html:522 templates/_tree.html:56 +#: templates/_popups.html:522 templates/_tree.html:61 msgid "Rename Dataset" msgstr "" #: templates/_popups.html:527 templates/_popups.html:538 -#: templates/_tree.html:27 +#: templates/_tree.html:32 msgid "Rename" msgstr "" @@ -742,7 +742,7 @@ msgid "Click to change color" msgstr "" #: templates/_sidebars.html:33 templates/_strings.html:51 -#: templates/_tree.html:45 templates/_tree.html:65 +#: templates/_tree.html:50 templates/_tree.html:70 msgid "Distance" msgstr "" @@ -998,7 +998,7 @@ msgstr "" msgid "Please calibrate the axes before managing datasets." msgstr "" -#: templates/_strings.html:27 templates/_tree.html:57 +#: templates/_strings.html:27 templates/_tree.html:62 msgid "Delete Dataset" msgstr "" @@ -1078,24 +1078,24 @@ msgstr "" msgid "Specify a valid number of datasets to add!" msgstr "" -#: templates/_strings.html:48 templates/_tree.html:35 +#: templates/_strings.html:48 templates/_tree.html:40 msgid "Datasets" msgstr "" -#: templates/_strings.html:49 templates/_tree.html:43 +#: templates/_strings.html:49 templates/_tree.html:48 msgid "Measurements" msgstr "" -#: templates/_strings.html:50 templates/_tree.html:15 templates/_tree.html:25 -#: templates/_tree.html:54 templates/_tree.html:67 templates/_tree.html:84 +#: templates/_strings.html:50 templates/_tree.html:20 templates/_tree.html:30 +#: templates/_tree.html:59 templates/_tree.html:72 templates/_tree.html:89 msgid "Axes" msgstr "" -#: templates/_strings.html:52 templates/_tree.html:46 templates/_tree.html:74 +#: templates/_strings.html:52 templates/_tree.html:51 templates/_tree.html:79 msgid "Angle" msgstr "" -#: templates/_strings.html:53 templates/_tree.html:47 templates/_tree.html:82 +#: templates/_strings.html:53 templates/_tree.html:52 templates/_tree.html:87 msgid "Area/Perimeter" msgstr "" @@ -1151,60 +1151,80 @@ msgstr "" msgid "Not a valid project file format!" msgstr "" +#: templates/_strings.html:69 +msgid "of" +msgstr "" + +#: templates/_strings.html:70 +msgid "Page" +msgstr "" + #: templates/_toolbars.html:3 msgid "View Keyboard Shortcuts" msgstr "" -#: templates/_tree.html:17 +#: templates/_tree.html:11 +msgid "Previous Page" +msgstr "" + +#: templates/_tree.html:12 +msgid "Next Page" +msgstr "" + +#: templates/_tree.html:14 +msgid "Go" +msgstr "" + +#: templates/_tree.html:22 msgid "Add Calibration" msgstr "" -#: templates/_tree.html:18 +#: templates/_tree.html:23 msgid "Remove Grid" msgstr "" -#: templates/_tree.html:19 +#: templates/_tree.html:24 msgid "Import Calibration" msgstr "" -#: templates/_tree.html:20 +#: templates/_tree.html:25 msgid "Export Calibration" msgstr "" -#: templates/_tree.html:28 +#: templates/_tree.html:33 msgid "Tweak Calibration" msgstr "" -#: templates/_tree.html:29 +#: templates/_tree.html:34 msgid "Delete" msgstr "" -#: templates/_tree.html:30 +#: templates/_tree.html:35 msgid "View Equations" msgstr "" -#: templates/_tree.html:38 +#: templates/_tree.html:43 msgid "Export All Data" msgstr "" -#: templates/_tree.html:55 +#: templates/_tree.html:60 msgid "Display Color" msgstr "" -#: templates/_tree.html:58 templates/_tree.html:69 templates/_tree.html:77 -#: templates/_tree.html:86 +#: templates/_tree.html:63 templates/_tree.html:74 templates/_tree.html:82 +#: templates/_tree.html:91 msgid "View Data" msgstr "" -#: templates/_tree.html:59 +#: templates/_tree.html:64 msgid "Clear Data" msgstr "" -#: templates/_tree.html:60 +#: templates/_tree.html:65 msgid "Data Points" msgstr "" -#: templates/_tree.html:68 templates/_tree.html:76 templates/_tree.html:85 +#: templates/_tree.html:73 templates/_tree.html:81 templates/_tree.html:90 msgid "Clear All" msgstr "" @@ -1913,3 +1933,21 @@ msgstr "" #~ msgid "Rotate" #~ msgstr "" +#~ msgid "<<" +#~ msgstr "" + +#~ msgid "<" +#~ msgstr "" + +#~ msgid ">" +#~ msgstr "" + +#~ msgid ">>" +#~ msgstr "" + +#~ msgid "First Page" +#~ msgstr "" + +#~ msgid "Last Page" +#~ msgstr "" + diff --git a/app/locale/zh_CN/LC_MESSAGES/messages.po b/app/locale/zh_CN/LC_MESSAGES/messages.po index bd7bbf8ce..b66dd6530 100644 --- a/app/locale/zh_CN/LC_MESSAGES/messages.po +++ b/app/locale/zh_CN/LC_MESSAGES/messages.po @@ -161,7 +161,7 @@ msgstr "拍照" #: templates/_popups.html:145 templates/_popups.html:169 #: templates/_popups.html:178 templates/_popups.html:209 #: templates/_popups.html:247 templates/_popups.html:465 -#: templates/_popups.html:478 templates/_popups.html:549 +#: templates/_popups.html:478 templates/_popups.html:550 msgid "OK" msgstr "确认" @@ -307,7 +307,7 @@ msgid "Acquired Data" msgstr "采集的数据" #: templates/_popups.html:258 templates/_strings.html:47 -#: templates/_tree.html:52 +#: templates/_tree.html:57 msgid "Dataset" msgstr "数据集" @@ -630,7 +630,7 @@ msgstr "" msgid "Export to Plotly" msgstr "导出到 Plotly" -#: templates/_popups.html:512 templates/_tree.html:37 +#: templates/_popups.html:512 templates/_tree.html:42 msgid "Add Dataset" msgstr "添加数据集" @@ -651,12 +651,12 @@ msgstr "数量" msgid "Add Multiple Datasets" msgstr "添加多个数据集" -#: templates/_popups.html:522 templates/_tree.html:56 +#: templates/_popups.html:522 templates/_tree.html:61 msgid "Rename Dataset" msgstr "重命名数据集" #: templates/_popups.html:527 templates/_popups.html:538 -#: templates/_tree.html:27 +#: templates/_tree.html:32 msgid "Rename" msgstr "重命名" @@ -751,7 +751,7 @@ msgid "Click to change color" msgstr "单击选择颜色" #: templates/_sidebars.html:33 templates/_strings.html:51 -#: templates/_tree.html:45 templates/_tree.html:65 +#: templates/_tree.html:50 templates/_tree.html:70 msgid "Distance" msgstr "距离" @@ -1007,7 +1007,7 @@ msgstr "管理数据集" msgid "Please calibrate the axes before managing datasets." msgstr "请先标定坐标轴,再开始整理数据集。" -#: templates/_strings.html:27 templates/_tree.html:57 +#: templates/_strings.html:27 templates/_tree.html:62 msgid "Delete Dataset" msgstr "删除数据集" @@ -1087,24 +1087,24 @@ msgstr "已存在相同名称的坐标轴,请选择一个不同的名称。" msgid "Specify a valid number of datasets to add!" msgstr "指定要添加的数据集个数的有效值!" -#: templates/_strings.html:48 templates/_tree.html:35 +#: templates/_strings.html:48 templates/_tree.html:40 msgid "Datasets" msgstr "数据集" -#: templates/_strings.html:49 templates/_tree.html:43 +#: templates/_strings.html:49 templates/_tree.html:48 msgid "Measurements" msgstr "测量" -#: templates/_strings.html:50 templates/_tree.html:15 templates/_tree.html:25 -#: templates/_tree.html:54 templates/_tree.html:67 templates/_tree.html:84 +#: templates/_strings.html:50 templates/_tree.html:20 templates/_tree.html:30 +#: templates/_tree.html:59 templates/_tree.html:72 templates/_tree.html:89 msgid "Axes" msgstr "坐标轴" -#: templates/_strings.html:52 templates/_tree.html:46 templates/_tree.html:74 +#: templates/_strings.html:52 templates/_tree.html:51 templates/_tree.html:79 msgid "Angle" msgstr "角度" -#: templates/_strings.html:53 templates/_tree.html:47 templates/_tree.html:82 +#: templates/_strings.html:53 templates/_tree.html:52 templates/_tree.html:87 msgid "Area/Perimeter" msgstr "面积/周长" @@ -1160,60 +1160,80 @@ msgstr "无效的项目!" msgid "Not a valid project file format!" msgstr "不是有效的项目文件格式!" +#: templates/_strings.html:69 +msgid "of" +msgstr "" + +#: templates/_strings.html:70 +msgid "Page" +msgstr "" + #: templates/_toolbars.html:3 msgid "View Keyboard Shortcuts" msgstr "查看键盘快捷键" -#: templates/_tree.html:17 +#: templates/_tree.html:11 +msgid "Previous Page" +msgstr "" + +#: templates/_tree.html:12 +msgid "Next Page" +msgstr "" + +#: templates/_tree.html:14 +msgid "Go" +msgstr "" + +#: templates/_tree.html:22 msgid "Add Calibration" msgstr "添加标定" -#: templates/_tree.html:18 +#: templates/_tree.html:23 msgid "Remove Grid" msgstr "清除网格" -#: templates/_tree.html:19 +#: templates/_tree.html:24 msgid "Import Calibration" msgstr "导入标定" -#: templates/_tree.html:20 +#: templates/_tree.html:25 msgid "Export Calibration" msgstr "导出标定" -#: templates/_tree.html:28 +#: templates/_tree.html:33 msgid "Tweak Calibration" msgstr "调整标定" -#: templates/_tree.html:29 +#: templates/_tree.html:34 msgid "Delete" msgstr "删除" -#: templates/_tree.html:30 +#: templates/_tree.html:35 msgid "View Equations" msgstr "查看方程" -#: templates/_tree.html:38 +#: templates/_tree.html:43 msgid "Export All Data" msgstr "导出所有数据" -#: templates/_tree.html:55 +#: templates/_tree.html:60 msgid "Display Color" msgstr "" -#: templates/_tree.html:58 templates/_tree.html:69 templates/_tree.html:77 -#: templates/_tree.html:86 +#: templates/_tree.html:63 templates/_tree.html:74 templates/_tree.html:82 +#: templates/_tree.html:91 msgid "View Data" msgstr "查看数据" -#: templates/_tree.html:59 +#: templates/_tree.html:64 msgid "Clear Data" msgstr "清除数据" -#: templates/_tree.html:60 +#: templates/_tree.html:65 msgid "Data Points" msgstr "数据点数" -#: templates/_tree.html:68 templates/_tree.html:76 templates/_tree.html:85 +#: templates/_tree.html:73 templates/_tree.html:81 templates/_tree.html:90 msgid "Clear All" msgstr "清除所有" @@ -1238,3 +1258,21 @@ msgstr "清除所有" #~ msgid "WebPlotDigitizer-Examples repository" #~ msgstr "WebPlotDigitizer - 范例库" +#~ msgid "<<" +#~ msgstr "" + +#~ msgid "<" +#~ msgstr "" + +#~ msgid ">" +#~ msgstr "" + +#~ msgid ">>" +#~ msgstr "" + +#~ msgid "First Page" +#~ msgstr "" + +#~ msgid "Last Page" +#~ msgstr "" + diff --git a/app/styles.css b/app/styles.css index 13cd07cae..53b18ad4e 100644 --- a/app/styles.css +++ b/app/styles.css @@ -283,4 +283,4 @@ select { border: thin lightgray solid; padding-top: 5px; display: none; -} \ No newline at end of file +} diff --git a/app/templates/_popups.html b/app/templates/_popups.html index a60659977..6a3275f80 100644 --- a/app/templates/_popups.html +++ b/app/templates/_popups.html @@ -545,6 +545,7 @@

Dimensions: pixels

+

@@ -562,4 +563,4 @@
-{% endif %} \ No newline at end of file +{% endif %} diff --git a/app/templates/_strings.html b/app/templates/_strings.html index 033bf629c..d62f30fe2 100644 --- a/app/templates/_strings.html +++ b/app/templates/_strings.html @@ -65,4 +65,6 @@
{{ _("Assign an axes calibration to this dataset!") }}
{{ _("Invalid Project!") }}
{{ _("Not a valid project file format!") }}
-
{{ _("Image") }}
\ No newline at end of file +
{{ _("Image") }}
+
{{ _("of") }}
+
{{ _("Page") }}
diff --git a/app/templates/_tree.html b/app/templates/_tree.html index 93c269305..af1acd2fe 100644 --- a/app/templates/_tree.html +++ b/app/templates/_tree.html @@ -8,6 +8,11 @@

+ + +
@@ -87,4 +92,4 @@ - \ No newline at end of file + diff --git a/app/templates/dev.html b/app/templates/dev.html index 41e80310d..e6b8e952c 100644 --- a/app/templates/dev.html +++ b/app/templates/dev.html @@ -42,6 +42,7 @@ + @@ -78,4 +79,4 @@ -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/app/widgets.css b/app/widgets.css index 3c982733f..025abd694 100644 --- a/app/widgets.css +++ b/app/widgets.css @@ -1,6 +1,6 @@ /* WebPlotDigitizer - https://automeris.io/WebPlotDigitizer - + Copyright 2010-2020 Ankit Rohatgi This file is part of WebPlotDigitizer. @@ -151,6 +151,16 @@ input[type="file"] { font-size: 14px; } +input::-webkit-outer-spin-button, +input::-webkit-inner-spin-button { + -webkit-appearance: none; + margin: 0; +} + +input[type=number] { + -moz-appearance:textfield; +} + hr { height: 1px; border: none; @@ -221,4 +231,4 @@ select { background-color: red; display: inline-block; margin-right: 3px; -} \ No newline at end of file +}