Comments (3)
Each class along the inheritance line has a part to give into the serialized presentation. Thus, AbstractNode should create an object and others just add to it.
AbstractNode:
{
id: <string>,
children: [<item.serialize>] // preserves order
}
AbstractPlane & AbstractRectangle:
{
_T: {s, r, tx, ty},
_size: {width, height}
}
SpaceImage: image: {src}
SpaceHTML: html:
SpacePixel: color:
Interaction: is view specific, so should be serialized with the view
SpaceView: if serialized as a part of space, cannot be automatically mounted because we cannot store the container DOM element because it might not have an ID or anything identifying.
Method #serialize(stringify=true)
so that user gets the string by default.
from tapspace.
How to serialize a SpaceView:
SpaceView#serialize(stringify: <bool>)
SpaceView#deserialize(parse: <bool>)
Deserialize must return an unmounted view.
Serialize interaction mode of each item.
{
_interaction: {
<item-id>: <mode>
}
}
Consequence: targetItem must be part of the mode.
Consequence: interactions are owned by the view. This makes sense: destruction of the view must destroy the interaction artefacts. Consider view.enableInteraction(item, mode)
, view.disableInteraction(item)
, view.updateInteraction(item, mode)
.
from tapspace.
On the other hand, Tapspace belongs to the representation level. Why should we be able to serialize the representation? Any real-world use cases for the serialization? Let us put this to hold until we find a real-world use case.
from tapspace.
Related Issues (20)
- Fix docs
- Write Project history
- Add Touchable.stopPropagation flag
- Slow scrolling on some platforms HOT 1
- Rename translateScaleRotate to move HOT 1
- Set draggable attribute on SpaceImages
- npm run lint failing HOT 1
- Perspective rendering and parallax motion HOT 1
- How to add html elements outside the infinite canvas? HOT 2
- Pixelated rendering in Firefox and Safari HOT 3
- Multi-stage semantic zoom
- Forget 3D
- Improved FractalLoader HOT 2
- Clickable edges HOT 1
- prevent bubbling css transition events messing with animations
- bringToFront and sendToBack cause elements to lose hover state HOT 1
- allow removal of missing Viewport controls HOT 2
- remove hardcoded background color from ZoomControl
- improve Viewport:focus focusVisible behavior
- support adaptive full height viewport controls
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 tapspace.