Comments (2)
I removed the note re-order code since I can't find a good way to do it right. It was conflicting with the drag-save method that Chrome supports, and it relied entirely on the note table being rewritten.
Since the parser no longer rewrites the noteTable and attempts to retain the original data, note re-ordering has to be completely rethought to handle both display modes, retain as much data integrity as possible, and not interfere with other drag operations, and be done as elegantly as possible.
from mpkedit.
A billion years later, and I came up with a simple solution.
- Add a separate mode which enables reordering, have it off by default. This is fine because reordering is not that important, it's just nice to have.
- Reorder notes by just swapping them. This avoids all the issues I had before: no need to sanitize or sort the list before reordering. Minimal data changes, and doesn't lose any data, even when swapping to empty slots that contain garbage data. It also avoids 'accidental operations', because no changes occur until you let go on a destination, and leaving the destination will cancel the operation. The visual feedback is also pretty clear.
So all in all, now it's done right, and I can no longer feel guilty that the README lists a feature that doesn't exist. :)
from mpkedit.
Related Issues (16)
- NoteTable: Wipe the NoteTable clean HOT 2
- Error console gets spammed with CSS warnings. HOT 4
- Just a question about .note extension. HOT 6
- Replace var by let HOT 1
- Replace string concatenation by template literals HOT 1
- Thank you for such an awesome editor!
- dropHandler: Global filename access HOT 3
- Support for MiSTer N64 saves? HOT 18
- Parser: Central object or constructor for Parser?
- Making the parser more closely resemble the N64 libs HOT 3
- importNote: Error message when no notes left
- Move everything to parseIndexTable HOT 1
- Miscellaneous things HOT 3
- Controller Pak allows notes using the same Index? HOT 1
- Code design change: break the app down into modules
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 mpkedit.