Comments (8)
This is another example
test.json.zip
from microdraw.
hmm makes sense.
so on annotation load, client calculates hash. on subsequent saves, client calculates hashes. If the hash is different, it sends to the server to be saved.
I think it should be implemented in microdraw.js
and not in save.js
.
Perhaps with a new method, something like getUnsavedAnnotations()
which returns (or resolves) all annotations with hashes different to the previous save.
This could also solve a widely requested feature in our institute: showing which annotation are modified, and show warning if user is about to navigate away.
from microdraw.
the getUnsavedAnnotations
idea is good!
I merged a PR for the programmatic upload. I haven't removed the hash
stuff yet.
from microdraw.
(i'll close the issue, because of PR #187 , but we can keep the discussion here)
from microdraw.
commit looks great.
Curious as if req.body.action
is still needed? we could simplify the code a lot.
from microdraw.
it's true. It's kind of redundant with upload
from microdraw.
@xgui3783 ? How and where would you add tests for the functions inside /api/index.js
?
I have, for example, this one:
it('should detect a proper annotation object as such', (done) => {
const ann = [{annotation:{path:[
"Path",
{applyMatrix:true,segments:[[10,10],[20,20]],closed:true,fillColor:[1,0,0,1],strokeColor:[0,0,0],strokeScaling:false}
],"name": "Test"}}];
assert(validateAnnotation(ann)).to.be.true;
done();
});
from microdraw.
testing saveFromAPI
?
Hmm my approach would be changing
const saveFromAPI = function () {}
to
const saveFromAPI = function () {}
exports.saveFromAPI = saveFromAPI
then one can import the function like this:
const { saveFromAPI } = require('./api/index.js')
from microdraw.
Related Issues (20)
- Different json encryption for selected and not selected polygons HOT 5
- Server constantly checking for access token HOT 2
- update readme
- tests for /upload endpoint, allow for memory storage over fs by configuration HOT 3
- Differentiate Replace or Merge existing contours with imported ones
- Validate the json files before accepting a programmatic upload
- Inconsistency saving after 'AddRegion' and 'SubstractRegion' HOT 3
- Add test to compound path
- Using Rollup for bundling? HOT 2
- Should we avoid using `reject` when no data is found? HOT 3
- Running the mocha tests erases the complete MongoDB HOT 2
- flip region not working HOT 1
- changes requested
- Use random region UIDs HOT 1
- splitRegion desynchronises data and display region structures
- Panel slider button in "project" mode does not work in iOs
- Amplify size of movement needed to displace a region HOT 1
- Regarding microw embed into application HOT 1
- Microdraw tool as a library HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from microdraw.