Compare commits
83 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
978203d73e | ||
|
|
d5c7d51dc4 | ||
|
|
bba92f6a73 | ||
|
|
31e80f0727 | ||
|
|
f23bb36635 | ||
|
|
b39e9d6450 | ||
|
|
d93aa8a2ba | ||
|
|
672696ef86 | ||
|
|
7c81dceb23 | ||
|
|
592a0969d3 | ||
|
|
00458bab58 | ||
|
|
bc1c1f7bcf | ||
|
|
ed392e72ae | ||
|
|
fb68550e2c | ||
|
|
08fe014f9b | ||
|
|
9f9ba33428 | ||
|
|
0421b1ab6a | ||
|
|
bec7d107bd | ||
|
|
54844f4535 | ||
|
|
02d0ace241 | ||
|
|
bab4bcc94b | ||
|
|
e54402e842 | ||
|
|
f1f710b269 | ||
|
|
b647b2af58 | ||
|
|
6b46500325 | ||
|
|
3f2ab5cdfe | ||
|
|
ef9e183138 | ||
|
|
a1b07f84ea | ||
|
|
af3cd2361a | ||
|
|
d898136f64 | ||
|
|
d2fa906b50 | ||
|
|
17a752c93e | ||
|
|
e73829f73b | ||
|
|
877365d00c | ||
|
|
6790355232 | ||
|
|
fd1128d456 | ||
|
|
2f47ad9e3a | ||
|
|
cacfb54d5e | ||
|
|
21f7350c4d | ||
|
|
584964153c | ||
|
|
2cf899418a | ||
|
|
7696864841 | ||
|
|
9b582fc795 | ||
|
|
d4bb2dc173 | ||
|
|
e1900e8561 | ||
|
|
03925ab32f | ||
|
|
6965678581 | ||
|
|
df838fa1a6 | ||
|
|
94e66af751 | ||
|
|
ee516a6271 | ||
|
|
84601c2b94 | ||
|
|
bab06e9f3d | ||
|
|
be814f8f8c | ||
|
|
ee7c5e4bad | ||
|
|
590c5ea900 | ||
|
|
3c21fd08b7 | ||
|
|
d2f16eaa87 | ||
|
|
98e582c413 | ||
|
|
693f9bab67 | ||
|
|
6caab5e853 | ||
|
|
530210ca63 | ||
|
|
3415d0ee5e | ||
|
|
968e07a8ff | ||
|
|
1455933abb | ||
|
|
eb3afe9106 | ||
|
|
1e73381863 | ||
|
|
5cb7951d44 | ||
|
|
631bf47a96 | ||
|
|
51b5294e3c | ||
|
|
607d442abc | ||
|
|
6623bd6134 | ||
|
|
c337f37665 | ||
|
|
8fcd8f6809 | ||
|
|
03d652f70b | ||
|
|
98b1a8f660 | ||
|
|
09cd9f3394 | ||
|
|
12e8768c31 | ||
|
|
93a04c8e23 | ||
|
|
977e4d2a7c | ||
|
|
4da6efd634 | ||
|
|
b750d95b98 | ||
|
|
68c17f1876 | ||
|
|
b03f477a3f |
7
.gitignore
vendored
7
.gitignore
vendored
@@ -1,5 +1,6 @@
|
||||
/node_modules/
|
||||
.kateproject.d
|
||||
.kateproject
|
||||
bower_components
|
||||
.directory
|
||||
myftppass
|
||||
.c9
|
||||
.codio
|
||||
.settings
|
||||
100
README.md
100
README.md
@@ -1,90 +1,74 @@
|
||||
|
||||
# 
|
||||
# 
|
||||
[](http://layers.dbis.rwth-aachen.de/jenkins/job/Yatta/)
|
||||
|
||||
A Real-Time web framework that manages concurrency control for arbitrary data structures.
|
||||
Yatta! provides similar functionality as [ShareJs](https://github.com/share/ShareJS) and [OpenCoweb](https://github.com/opencoweb/coweb),
|
||||
but does not require you to understand how the internals work. The predefined data structures provide a simple API to access your shared data structures.
|
||||
|
||||
Predefined data structures:
|
||||
* Text - [Collaborative Text Editing Example](http://dadamonad.github.io/Yatta/examples/TextEditing/) and [Source](./examples/TextEditing/)
|
||||
* Json - [Tutorial](./examples/PeerJs-Json/)
|
||||
* XML (coming soon)
|
||||
Y is a framework for optimistic concurrency control and automatic conflict resolution on arbitrary data types. The framework implements a new OT-like concurrency algorithm and provides similar functionality as [ShareJs] and [OpenCoweb]. Y was designed to take away the pain from concurrently editing complex data types like Text, Json, and XML. For more information you should check out the [website](https://dadamonad.github.io/yjs/)!
|
||||
|
||||
Unlike other frameworks, Yatta! supports P2P message propagation and is not bound to a specific communication protocol.
|
||||
In the future, we want to enable users to implement their own collaborative types. Currently we provide data types for
|
||||
* Text
|
||||
* Json
|
||||
* XML
|
||||
|
||||
It is possible to add any communication protocol to Yatta. Currently it supports:
|
||||
* [PeerJs](http://peerjs.com/) - A WebRTC Framework
|
||||
* [IWC](http://dbis.rwth-aachen.de/cms/projects/the-xmpp-experience#interwidget-communication) - Inter-widget Communication
|
||||
Unlike other frameworks, Y supports P2P message propagation and is not bound to a specific communication protocol. Therefore, Y is extremely scalable and can be used in a wide range of application scenarios.
|
||||
|
||||
We support several communication protocols as so called *Connectors*. You find a bunch of Connectors in the [Y-Connectors](https://github.com/rwth-acis/y-connectors) repository. Currently supported communication protocols:
|
||||
* [XMPP-Connector](http://xmpp.org) - Propagates updates in a XMPP multi-user-chat room
|
||||
* [WebRTC-Connector](http://peerjs.com/) - Propagate updates directly with WebRTC
|
||||
* [IWC-Connector](http://dbis.rwth-aachen.de/cms/projects/the-xmpp-experience#interwidget-communication) - Inter-widget Communication
|
||||
|
||||
You can use Y client-, and server- side. You can get it as via npm, and bower. We even provide a polymer element for Y!
|
||||
|
||||
The theoretical advantages over similar frameworks are support for
|
||||
* .. P2P message propagation and arbitrary communication protocols
|
||||
* .. arbitrary complex data types
|
||||
* .. offline editing: Only relevant changes are propagated on rejoin (unimplemented)
|
||||
* .. AnyUndo: Undo *any* action that was executed in constant time (unimplemented)
|
||||
* .. Intention Preservation: When working on Text, the intention of your changes are preserved. This is particularily important when working offline.
|
||||
|
||||
## Use it!
|
||||
The [examples](./examples/) provide an excellent starting point for beginners. Also the [API Documentation](http://dadamonad.github.io/Yatta/doc/) could prove to be very helpful.
|
||||
You find a tutorial, examples, and documentation on the [website](https://dadamonad.github.io/yjs/).
|
||||
|
||||
Either clone this git repository, install it with [bower](http://bower.io/), or install it with [npm](https://www.npmjs.org/package/yatta).
|
||||
Either clone this git repository, install it with [bower](http://bower.io/), or install it with [npm](https://www.npmjs.org/package/yjs).
|
||||
|
||||
### Bower
|
||||
```
|
||||
bower install Yatta
|
||||
bower install yjs
|
||||
```
|
||||
Then you include the libraries directly from the installation folder.
|
||||
```
|
||||
<script src="./bower_components/yjs/y.js"></script>
|
||||
```
|
||||
|
||||
### Npm
|
||||
```
|
||||
npm install yatta --save
|
||||
npm install yjs --save
|
||||
```
|
||||
|
||||
And use it like this with *npm*:
|
||||
```
|
||||
Y = require("yatta");
|
||||
Y.createPeerJsConnector({key: 'xxx'}, function(Connector, user_id){
|
||||
yatta = new Y.JsonFramework(user_id, Connector);
|
||||
Y = require("yjs");
|
||||
```
|
||||
|
||||
|
||||
## About
|
||||
Find out more about the concurrent editing problem here
|
||||
[Cooperation, Concurrency, Conflicts, and Convergence](http://opencoweb.org/ocwdocs/intro/openg.html) and here
|
||||
[Operational Transformation (OT)](http://en.wikipedia.org/wiki/Operational_transformation)
|
||||
|
||||
My Bachelor Thesis project aim was to develop a P2P OT Framework that enables collaboration on XML documents and supports
|
||||
[Intention Preservation](http://www3.ntu.edu.sg/home/czsun/projects/otfaq/#intentionPreservation).
|
||||
After some time I realized that OT has significant drawbacks in P2P environments.
|
||||
|
||||
With my gained experiences I came up with a new approach. I named it *Yata* - Yet Another Transformation Approach.
|
||||
It enables concurrent editing with the following space and time properties:
|
||||
* Time complexity: O(S), whereby S is the number of operations that are inserted concurrently at the same position (no transformation against operations that happen on different positions).
|
||||
* Space complexity = O(|Document|), whereby |Document| is the size of the shared document.
|
||||
|
||||
This means that my approach beats all OT time complexities. Furthermore, Yatta has a very strict definition of Intention Preservation, and I was able to
|
||||
show that it is never violated.
|
||||
|
||||
Another advantage of Yata is that propagated messages are very small.
|
||||
Background: In Real-Time P2P OT algorithms you have to send a state-vector with each message that defines the state of the History Buffer
|
||||
on which the operation was created. This is not necessary in Yata.
|
||||
|
||||
The downside of this approach is that the History Buffer holds at least as many operations as there are characters in the document.
|
||||
In contrast, an OT algorithm can have an empty History Buffer while the document size is very big.
|
||||
|
||||
Eventually (after my thesis), I will publish more information about Yata.
|
||||
|
||||
So, how did I come up with the name for the implementation (Yatta! is not Yata)?
|
||||
Yatta! means "I did it!" in Japanese. You scream it when you accomplish something (for proper application I refer to the Yatta-man in [Heroes](http://heroeswiki.com/Yatta!)).
|
||||
There is also this awesome video on the Internet that will change your life [Yatta](https://www.youtube.com/watch?v=kL5DDSglM_s).
|
||||
|
||||
## Status
|
||||
Yatta! is still in an early development phase. Don't expect that everything is working fine.
|
||||
But I would become really motivated if you gave me some feedback :) ([github](https://github.com/DadaMonad/Yatta/issues)).
|
||||
yjs is still in an early development phase. Don't expect that everything is working fine.
|
||||
But I would become really motivated if you gave me some feedback :) ([github](https://github.com/rwth-acis/yjs/issues)).
|
||||
|
||||
### Current Issues
|
||||
Currently, I don't perform Garbage Collection. Therefore, the space requirement will never decrease.
|
||||
* Garbage Collection
|
||||
* XML support
|
||||
|
||||
* The History Buffer should be able to store operations in a database
|
||||
* Documentation
|
||||
* Reimplement support for XML as a data type
|
||||
* Custom data types
|
||||
|
||||
## Support
|
||||
Please report any issues to the [Github issue page](https://github.com/DadaMonad/Yatta/issues)!
|
||||
Please report _any_ issues to the [Github issue page](https://github.com/rwth-acis/yjs/issues)!
|
||||
I would appreciate if developers give me feedback on how _convenient_ the framework is, and if it is easy to use. Particularly the XML-support may not support every DOM-methods - if you encounter a method that does not cause any change on other peers, please state function name, and sample parameters. However, there are browser-specific features, that Y won't support.
|
||||
|
||||
## License
|
||||
Yatta! is licensed under the [MIT License](./LICENSE.txt).
|
||||
yjs is licensed under the [MIT License](./LICENSE.txt).
|
||||
|
||||
[ShareJs]: https://github.com/share/ShareJS
|
||||
[OpenCoweb]: https://github.com/opencoweb/coweb
|
||||
|
||||
<kevin.jahns@rwth-aachen.de>
|
||||
|
||||
|
||||
22
bower.json
22
bower.json
@@ -1,12 +1,16 @@
|
||||
{
|
||||
"name": "Yatta",
|
||||
"version": "0.0.5",
|
||||
"homepage": "https://github.com/DadaMonad/Yatta",
|
||||
"name": "yjs",
|
||||
"version": "0.3.0",
|
||||
"homepage": "https://github.com/DadaMonad/yjs",
|
||||
"authors": [
|
||||
"Kevin Jahns <kevin.jahns@rwth-aachen.de>"
|
||||
],
|
||||
"description": "A Framework that enables Real-Time Collaboration on arbitrary data structures.",
|
||||
"main": "./build/**",
|
||||
"description": "A Framework that enables Real-Time collaboration on arbitrary data structures.",
|
||||
"main": [
|
||||
"./y.js",
|
||||
"./y-object.html",
|
||||
"./build/node/y.js"
|
||||
],
|
||||
"keywords": [
|
||||
"OT",
|
||||
"collaboration",
|
||||
@@ -20,8 +24,10 @@
|
||||
"node_modules",
|
||||
"bower_components",
|
||||
"test",
|
||||
"Gruntfile.coffee",
|
||||
"extras",
|
||||
"tests"
|
||||
]
|
||||
"test"
|
||||
],
|
||||
"dependencies": {
|
||||
"polymer": "Polymer/polymer#~0.5.3"
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
1
build/browser/Connectors/IwcConnector.min.js
vendored
1
build/browser/Connectors/IwcConnector.min.js
vendored
@@ -1 +0,0 @@
|
||||
!function t(n,e,r){function i(u,a){if(!e[u]){if(!n[u]){var s="function"==typeof require&&require;if(!a&&s)return s(u,!0);if(o)return o(u,!0);throw new Error("Cannot find module '"+u+"'")}var c=e[u]={exports:{}};n[u][0].call(c.exports,function(t){var e=n[u][1][t];return i(e?e:t)},c,c.exports,t,n,e,r)}return e[u].exports}for(var o="function"==typeof require&&require,u=0;u<r.length;u++)i(r[u]);return i}({1:[function(t,n){var e;e=function(t,n){var e,r,i,o,u,a;return a=null,null!=n&&(a=n.iwcHandler),o={},r=new DUIClient,r.connect(function(t){var n;return null!=(n=o[t.action])&&n.map(function(n){return setTimeout(function(){return n(t)},0)}),null!=a?a(t):void 0}),r.initOK(),u=null,e=function(){function t(t,n,e,i){var a,s,c,l;this.engine=t,this.HB=n,this.execution_listener=e,this.yatta=i,this.duiClient=r,this.iwcHandler=o,l=function(t){return function(n){return 0!==Object.getOwnPropertyNames(t.initialized).length?t.send(n):void 0}}(this),this.execution_listener.push(l),this.initialized={},a=function(t){return function(e){var r;return n=e.extras.HB,r=e.extras.user,t.engine.applyOpsCheckDouble(n),t.initialized[r]=!0}}(this),o.Yatta_push_HB_element=[a],this.sendIwcIntent("Yatta_get_HB_element",this.HB.getOperationCounter()),s=function(t){return function(n){var e;return e=n.extras,null!=t.initialized[e.uid.creator]?t.receive(e):void 0}}(this),this.iwcHandler.Yatta_new_operation=[s],null!=u&&this.engine.applyOpsCheckDouble(u),c=function(t){return function(n){var e,r;return r=n.extras,console.log(r),e={HB:t.yatta.getHistoryBuffer()._encode(r),user:t.yatta.getUserId()},t.sendIwcIntent("Yatta_push_HB_element",e)}}(this),this.iwcHandler.Yatta_get_HB_element=[c]}return t.prototype.setIwcHandler=function(t){return a=t},t.prototype.sendIwcIntent=function(t,n){var e;return e=null,arguments.length>=2?(t=arguments[0],n=arguments[1],e={action:t,component:"",data:"",dataType:"",flags:["PUBLISH_GLOBAL"],extras:n}):e=arguments[0],this.duiClient.sendIntent(e)},t.prototype.send=function(t){return t.uid.creator===this.HB.getUserId()&&"string"!=typeof t.uid.op_number?this.sendIwcIntent("Yatta_new_operation",t):void 0},t.prototype.receive=function(t){return t.uid.creator!==this.HB.getUserId()?this.engine.applyOp(t):void 0},t}(),i=function(){var n;return n=Math.floor(1e6*Math.random()),t(e,n)},void setTimeout(i,5e3)},n.exports=e,"undefined"!=typeof window&&null!==window&&(null==window.Y&&(window.Y={}),window.Y.createIwcConnector=e)},{}]},{},[1]);
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
||||
!function n(e,t,r){function o(u,s){if(!t[u]){if(!e[u]){var c="function"==typeof require&&require;if(!s&&c)return c(u,!0);if(i)return i(u,!0);throw new Error("Cannot find module '"+u+"'")}var f=t[u]={exports:{}};e[u][0].call(f.exports,function(n){var t=e[u][1][n];return o(t?t:n)},f,f.exports,n,e,t,r)}return t[u].exports}for(var i="function"==typeof require&&require,u=0;u<r.length;u++)o(r[u]);return o}({1:[function(n,e){var t;t=function(){var n,e,t;return t=null,2===arguments.length?(t=new Peer(arguments[0]),e=arguments[1]):(t=new Peer(arguments[0],arguments[1]),e=arguments[2]),n=function(){function n(n,e,r,o){var i;this.engine=n,this.HB=e,this.execution_listener=r,this.yatta=o,this.peer=t,this.connections={},this.peer.on("connection",function(n){return function(e){return n.addConnection(e)}}(this)),i=function(n){return function(e){var t,r,o,i;if(e.uid.creator===n.HB.getUserId()&&"string"!=typeof e.uid.op_number){o=n.connections,i=[];for(r in o)t=o[r],i.push(t.send({op:e}));return i}}}(this),this.execution_listener.push(i)}return n.prototype.connectToPeer=function(n){return null==this.connections[n]&&n!==this.yatta.getUserId()?this.addConnection(t.connect(n)):void 0},n.prototype.getAllConnectionIds=function(){var n,e;e=[];for(n in this.connections)e.push(n);return e},n.prototype.addConnection=function(n){var e,t,r;return this.connections[n.peer]=n,t=!1,e=!1,n.on("data",function(r){return function(o){var i,u,s,c,f;if("empty_message"===o);else{if(null!=o.HB)return t=!0,r.engine.applyOpsCheckDouble(o.HB),n.send({conns:r.getAllConnectionIds()});if(null!=o.op)return r.engine.applyOp(o.op);if(null!=o.conns){for(c=o.conns,f=[],u=0,s=c.length;s>u;u++)i=c[u],f.push(r.connectToPeer(i));return f}if(null==o.state_vector)throw new Error("Can't parse this operation");if(!e)return n.send({HB:r.yatta.getHistoryBuffer()._encode(o.state_vector)}),e=!0}}}(this)),(r=function(e){return function(){return n.send({state_vector:e.HB.getOperationCounter()}),t?void 0:setTimeout(r,100)}}(this))()},n}(),t.on("open",function(t){return e(n,t)})},e.exports=t,"undefined"!=typeof window&&null!==window&&(null==window.Y&&(window.Y={}),window.Y.createPeerJsConnector=t)},{}]},{},[1]);
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
68
build/node/ConnectorAdapter.js
Normal file
68
build/node/ConnectorAdapter.js
Normal file
@@ -0,0 +1,68 @@
|
||||
var adaptConnector;
|
||||
|
||||
adaptConnector = function(connector, engine, HB, execution_listener) {
|
||||
var applyHB, encode_state_vector, getHB, getStateVector, parse_state_vector, send_;
|
||||
send_ = function(o) {
|
||||
if (o.uid.creator === HB.getUserId() && (typeof o.uid.op_number !== "string")) {
|
||||
return connector.broadcast(o);
|
||||
}
|
||||
};
|
||||
if (connector.invokeSync != null) {
|
||||
HB.setInvokeSyncHandler(connector.invokeSync);
|
||||
}
|
||||
execution_listener.push(send_);
|
||||
encode_state_vector = function(v) {
|
||||
var name, value, _results;
|
||||
_results = [];
|
||||
for (name in v) {
|
||||
value = v[name];
|
||||
_results.push({
|
||||
user: name,
|
||||
state: value
|
||||
});
|
||||
}
|
||||
return _results;
|
||||
};
|
||||
parse_state_vector = function(v) {
|
||||
var s, state_vector, _i, _len;
|
||||
state_vector = {};
|
||||
for (_i = 0, _len = v.length; _i < _len; _i++) {
|
||||
s = v[_i];
|
||||
state_vector[s.user] = s.state;
|
||||
}
|
||||
return state_vector;
|
||||
};
|
||||
getStateVector = function() {
|
||||
return encode_state_vector(HB.getOperationCounter());
|
||||
};
|
||||
getHB = function(v) {
|
||||
var hb, json, o, state_vector, _i, _len;
|
||||
state_vector = parse_state_vector(v);
|
||||
hb = HB._encode(state_vector);
|
||||
for (_i = 0, _len = hb.length; _i < _len; _i++) {
|
||||
o = hb[_i];
|
||||
o.fromHB = "true";
|
||||
}
|
||||
json = {
|
||||
hb: hb,
|
||||
state_vector: encode_state_vector(HB.getOperationCounter())
|
||||
};
|
||||
return json;
|
||||
};
|
||||
applyHB = function(hb) {
|
||||
return engine.applyOp(hb);
|
||||
};
|
||||
connector.getStateVector = getStateVector;
|
||||
connector.getHB = getHB;
|
||||
connector.applyHB = applyHB;
|
||||
connector.whenReceiving(function(sender, op) {
|
||||
if (op.uid.creator !== HB.getUserId()) {
|
||||
return engine.applyOp(op);
|
||||
}
|
||||
});
|
||||
if (connector._whenBoundToY != null) {
|
||||
return connector._whenBoundToY();
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = adaptConnector;
|
||||
@@ -1,142 +0,0 @@
|
||||
(function() {
|
||||
var createIwcConnector;
|
||||
|
||||
createIwcConnector = function(callback, options) {
|
||||
var IwcConnector, duiClient, init, iwcHandler, received_HB, userIwcHandler;
|
||||
userIwcHandler = null;
|
||||
if (options != null) {
|
||||
userIwcHandler = options.iwcHandler;
|
||||
}
|
||||
iwcHandler = {};
|
||||
duiClient = new DUIClient();
|
||||
duiClient.connect(function(intent) {
|
||||
var _ref;
|
||||
if ((_ref = iwcHandler[intent.action]) != null) {
|
||||
_ref.map(function(f) {
|
||||
return setTimeout(function() {
|
||||
return f(intent);
|
||||
}, 0);
|
||||
});
|
||||
}
|
||||
if (userIwcHandler != null) {
|
||||
return userIwcHandler(intent);
|
||||
}
|
||||
});
|
||||
duiClient.initOK();
|
||||
received_HB = null;
|
||||
IwcConnector = (function() {
|
||||
function IwcConnector(engine, HB, execution_listener, yatta) {
|
||||
var receiveHB, receive_, sendHistoryBuffer, send_;
|
||||
this.engine = engine;
|
||||
this.HB = HB;
|
||||
this.execution_listener = execution_listener;
|
||||
this.yatta = yatta;
|
||||
this.duiClient = duiClient;
|
||||
this.iwcHandler = iwcHandler;
|
||||
send_ = (function(_this) {
|
||||
return function(o) {
|
||||
if (Object.getOwnPropertyNames(_this.initialized).length !== 0) {
|
||||
return _this.send(o);
|
||||
}
|
||||
};
|
||||
})(this);
|
||||
this.execution_listener.push(send_);
|
||||
this.initialized = {};
|
||||
receiveHB = (function(_this) {
|
||||
return function(json) {
|
||||
var him;
|
||||
HB = json.extras.HB;
|
||||
him = json.extras.user;
|
||||
_this.engine.applyOpsCheckDouble(HB);
|
||||
return _this.initialized[him] = true;
|
||||
};
|
||||
})(this);
|
||||
iwcHandler["Yatta_push_HB_element"] = [receiveHB];
|
||||
this.sendIwcIntent("Yatta_get_HB_element", this.HB.getOperationCounter());
|
||||
receive_ = (function(_this) {
|
||||
return function(intent) {
|
||||
var o;
|
||||
o = intent.extras;
|
||||
if (_this.initialized[o.uid.creator] != null) {
|
||||
return _this.receive(o);
|
||||
}
|
||||
};
|
||||
})(this);
|
||||
this.iwcHandler["Yatta_new_operation"] = [receive_];
|
||||
if (received_HB != null) {
|
||||
this.engine.applyOpsCheckDouble(received_HB);
|
||||
}
|
||||
sendHistoryBuffer = (function(_this) {
|
||||
return function(intent) {
|
||||
var json, state_vector;
|
||||
state_vector = intent.extras;
|
||||
console.log(state_vector);
|
||||
json = {
|
||||
HB: _this.yatta.getHistoryBuffer()._encode(state_vector),
|
||||
user: _this.yatta.getUserId()
|
||||
};
|
||||
return _this.sendIwcIntent("Yatta_push_HB_element", json);
|
||||
};
|
||||
})(this);
|
||||
this.iwcHandler["Yatta_get_HB_element"] = [sendHistoryBuffer];
|
||||
}
|
||||
|
||||
IwcConnector.prototype.setIwcHandler = function(f) {
|
||||
return userIwcHandler = f;
|
||||
};
|
||||
|
||||
IwcConnector.prototype.sendIwcIntent = function(action_name, content) {
|
||||
var intent;
|
||||
intent = null;
|
||||
if (arguments.length >= 2) {
|
||||
action_name = arguments[0], content = arguments[1];
|
||||
intent = {
|
||||
action: action_name,
|
||||
component: "",
|
||||
data: "",
|
||||
dataType: "",
|
||||
flags: ["PUBLISH_GLOBAL"],
|
||||
extras: content
|
||||
};
|
||||
} else {
|
||||
intent = arguments[0];
|
||||
}
|
||||
return this.duiClient.sendIntent(intent);
|
||||
};
|
||||
|
||||
IwcConnector.prototype.send = function(o) {
|
||||
if (o.uid.creator === this.HB.getUserId() && (typeof o.uid.op_number !== "string")) {
|
||||
return this.sendIwcIntent("Yatta_new_operation", o);
|
||||
}
|
||||
};
|
||||
|
||||
IwcConnector.prototype.receive = function(o) {
|
||||
if (o.uid.creator !== this.HB.getUserId()) {
|
||||
return this.engine.applyOp(o);
|
||||
}
|
||||
};
|
||||
|
||||
return IwcConnector;
|
||||
|
||||
})();
|
||||
init = function() {
|
||||
var proposed_user_id;
|
||||
proposed_user_id = Math.floor(Math.random() * 1000000);
|
||||
return callback(IwcConnector, proposed_user_id);
|
||||
};
|
||||
setTimeout(init, 5000);
|
||||
return void 0;
|
||||
};
|
||||
|
||||
module.exports = createIwcConnector;
|
||||
|
||||
if (typeof window !== "undefined" && window !== null) {
|
||||
if (window.Y == null) {
|
||||
window.Y = {};
|
||||
}
|
||||
window.Y.createIwcConnector = createIwcConnector;
|
||||
}
|
||||
|
||||
}).call(this);
|
||||
|
||||
//# sourceMappingURL=../Connectors/IwcConnector.js.map
|
||||
File diff suppressed because one or more lines are too long
@@ -1,132 +0,0 @@
|
||||
(function() {
|
||||
var createPeerJsConnector;
|
||||
|
||||
createPeerJsConnector = function() {
|
||||
var PeerJsConnector, callback, peer;
|
||||
peer = null;
|
||||
if (arguments.length === 2) {
|
||||
peer = new Peer(arguments[0]);
|
||||
callback = arguments[1];
|
||||
} else {
|
||||
peer = new Peer(arguments[0], arguments[1]);
|
||||
callback = arguments[2];
|
||||
}
|
||||
PeerJsConnector = (function() {
|
||||
function PeerJsConnector(engine, HB, execution_listener, yatta) {
|
||||
var send_;
|
||||
this.engine = engine;
|
||||
this.HB = HB;
|
||||
this.execution_listener = execution_listener;
|
||||
this.yatta = yatta;
|
||||
this.peer = peer;
|
||||
this.connections = {};
|
||||
this.peer.on('connection', (function(_this) {
|
||||
return function(conn) {
|
||||
return _this.addConnection(conn);
|
||||
};
|
||||
})(this));
|
||||
send_ = (function(_this) {
|
||||
return function(o) {
|
||||
var conn, conn_id, _ref, _results;
|
||||
if (o.uid.creator === _this.HB.getUserId() && (typeof o.uid.op_number !== "string")) {
|
||||
_ref = _this.connections;
|
||||
_results = [];
|
||||
for (conn_id in _ref) {
|
||||
conn = _ref[conn_id];
|
||||
_results.push(conn.send({
|
||||
op: o
|
||||
}));
|
||||
}
|
||||
return _results;
|
||||
}
|
||||
};
|
||||
})(this);
|
||||
this.execution_listener.push(send_);
|
||||
}
|
||||
|
||||
PeerJsConnector.prototype.connectToPeer = function(id) {
|
||||
if ((this.connections[id] == null) && id !== this.yatta.getUserId()) {
|
||||
return this.addConnection(peer.connect(id));
|
||||
}
|
||||
};
|
||||
|
||||
PeerJsConnector.prototype.getAllConnectionIds = function() {
|
||||
var conn_id, _results;
|
||||
_results = [];
|
||||
for (conn_id in this.connections) {
|
||||
_results.push(conn_id);
|
||||
}
|
||||
return _results;
|
||||
};
|
||||
|
||||
PeerJsConnector.prototype.addConnection = function(conn) {
|
||||
var initialized_him, initialized_me, sendStateVector;
|
||||
this.connections[conn.peer] = conn;
|
||||
initialized_me = false;
|
||||
initialized_him = false;
|
||||
conn.on('data', (function(_this) {
|
||||
return function(data) {
|
||||
var conn_id, _i, _len, _ref, _results;
|
||||
if (data === "empty_message") {
|
||||
|
||||
} else if (data.HB != null) {
|
||||
initialized_me = true;
|
||||
_this.engine.applyOpsCheckDouble(data.HB);
|
||||
return conn.send({
|
||||
conns: _this.getAllConnectionIds()
|
||||
});
|
||||
} else if (data.op != null) {
|
||||
return _this.engine.applyOp(data.op);
|
||||
} else if (data.conns != null) {
|
||||
_ref = data.conns;
|
||||
_results = [];
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
conn_id = _ref[_i];
|
||||
_results.push(_this.connectToPeer(conn_id));
|
||||
}
|
||||
return _results;
|
||||
} else if (data.state_vector != null) {
|
||||
if (!initialized_him) {
|
||||
conn.send({
|
||||
HB: _this.yatta.getHistoryBuffer()._encode(data.state_vector)
|
||||
});
|
||||
return initialized_him = true;
|
||||
}
|
||||
} else {
|
||||
throw new Error("Can't parse this operation");
|
||||
}
|
||||
};
|
||||
})(this));
|
||||
sendStateVector = (function(_this) {
|
||||
return function() {
|
||||
conn.send({
|
||||
state_vector: _this.HB.getOperationCounter()
|
||||
});
|
||||
if (!initialized_me) {
|
||||
return setTimeout(sendStateVector, 100);
|
||||
}
|
||||
};
|
||||
})(this);
|
||||
return sendStateVector();
|
||||
};
|
||||
|
||||
return PeerJsConnector;
|
||||
|
||||
})();
|
||||
return peer.on('open', function(id) {
|
||||
return callback(PeerJsConnector, id);
|
||||
});
|
||||
};
|
||||
|
||||
module.exports = createPeerJsConnector;
|
||||
|
||||
if (typeof window !== "undefined" && window !== null) {
|
||||
if (window.Y == null) {
|
||||
window.Y = {};
|
||||
}
|
||||
window.Y.createPeerJsConnector = createPeerJsConnector;
|
||||
}
|
||||
|
||||
}).call(this);
|
||||
|
||||
//# sourceMappingURL=../Connectors/PeerJsConnector.js.map
|
||||
File diff suppressed because one or more lines are too long
@@ -1,89 +0,0 @@
|
||||
(function() {
|
||||
var _;
|
||||
|
||||
_ = require("underscore");
|
||||
|
||||
module.exports = function(user_list) {
|
||||
var TestConnector;
|
||||
return TestConnector = (function() {
|
||||
function TestConnector(engine, HB, execution_listener) {
|
||||
var appliedOperationsListener, send_;
|
||||
this.engine = engine;
|
||||
this.HB = HB;
|
||||
this.execution_listener = execution_listener;
|
||||
send_ = (function(_this) {
|
||||
return function(o) {
|
||||
return _this.send(o);
|
||||
};
|
||||
})(this);
|
||||
this.execution_listener.push(send_);
|
||||
this.applied_operations = [];
|
||||
appliedOperationsListener = (function(_this) {
|
||||
return function(o) {
|
||||
return _this.applied_operations.push(o);
|
||||
};
|
||||
})(this);
|
||||
this.execution_listener.push(appliedOperationsListener);
|
||||
if (!((user_list != null ? user_list.length : void 0) === 0)) {
|
||||
this.engine.applyOps(user_list[0].getHistoryBuffer()._encode());
|
||||
}
|
||||
this.unexecuted = {};
|
||||
}
|
||||
|
||||
TestConnector.prototype.getOpsInExecutionOrder = function() {
|
||||
return this.applied_operations;
|
||||
};
|
||||
|
||||
TestConnector.prototype.send = function(o) {
|
||||
var user, _i, _len, _results;
|
||||
if ((o.uid.creator === this.HB.getUserId()) && (typeof o.uid.op_number !== "string")) {
|
||||
_results = [];
|
||||
for (_i = 0, _len = user_list.length; _i < _len; _i++) {
|
||||
user = user_list[_i];
|
||||
if (user.getUserId() !== this.HB.getUserId()) {
|
||||
_results.push(user.getConnector().receive(o));
|
||||
} else {
|
||||
_results.push(void 0);
|
||||
}
|
||||
}
|
||||
return _results;
|
||||
}
|
||||
};
|
||||
|
||||
TestConnector.prototype.receive = function(o) {
|
||||
var _base, _name;
|
||||
if ((_base = this.unexecuted)[_name = o.uid.creator] == null) {
|
||||
_base[_name] = [];
|
||||
}
|
||||
return this.unexecuted[o.uid.creator].push(o);
|
||||
};
|
||||
|
||||
TestConnector.prototype.flushOne = function(user) {
|
||||
var _ref;
|
||||
if (((_ref = this.unexecuted[user]) != null ? _ref.length : void 0) > 0) {
|
||||
return this.engine.applyOp(this.unexecuted[user].shift());
|
||||
}
|
||||
};
|
||||
|
||||
TestConnector.prototype.flushOneRandom = function() {
|
||||
return this.flushOne(_.random(0, user_list.length - 1));
|
||||
};
|
||||
|
||||
TestConnector.prototype.flushAll = function() {
|
||||
var n, ops, _ref;
|
||||
_ref = this.unexecuted;
|
||||
for (n in _ref) {
|
||||
ops = _ref[n];
|
||||
this.engine.applyOps(ops);
|
||||
}
|
||||
return this.unexecuted = {};
|
||||
};
|
||||
|
||||
return TestConnector;
|
||||
|
||||
})();
|
||||
};
|
||||
|
||||
}).call(this);
|
||||
|
||||
//# sourceMappingURL=../Connectors/TestConnector.js.map
|
||||
@@ -1 +0,0 @@
|
||||
{"version":3,"sources":["Connectors/TestConnector.coffee"],"names":[],"mappings":"AACA;AAAA,MAAA,CAAA;;AAAA,EAAA,CAAA,GAAI,OAAA,CAAQ,YAAR,CAAJ,CAAA;;AAAA,EAEA,MAAM,CAAC,OAAP,GAAiB,SAAC,SAAD,GAAA;AAMf,QAAA,aAAA;WAAM;AAQS,MAAA,uBAAE,MAAF,EAAW,EAAX,EAAgB,kBAAhB,GAAA;AACX,YAAA,gCAAA;AAAA,QADY,IAAC,CAAA,SAAA,MACb,CAAA;AAAA,QADqB,IAAC,CAAA,KAAA,EACtB,CAAA;AAAA,QAD0B,IAAC,CAAA,qBAAA,kBAC3B,CAAA;AAAA,QAAA,KAAA,GAAQ,CAAA,SAAA,KAAA,GAAA;iBAAA,SAAC,CAAD,GAAA;mBACN,KAAC,CAAA,IAAD,CAAM,CAAN,EADM;UAAA,EAAA;QAAA,CAAA,CAAA,CAAA,IAAA,CAAR,CAAA;AAAA,QAEA,IAAC,CAAA,kBAAkB,CAAC,IAApB,CAAyB,KAAzB,CAFA,CAAA;AAAA,QAIA,IAAC,CAAA,kBAAD,GAAsB,EAJtB,CAAA;AAAA,QAKA,yBAAA,GAA4B,CAAA,SAAA,KAAA,GAAA;iBAAA,SAAC,CAAD,GAAA;mBAC1B,KAAC,CAAA,kBAAkB,CAAC,IAApB,CAAyB,CAAzB,EAD0B;UAAA,EAAA;QAAA,CAAA,CAAA,CAAA,IAAA,CAL5B,CAAA;AAAA,QAOA,IAAC,CAAA,kBAAkB,CAAC,IAApB,CAAyB,yBAAzB,CAPA,CAAA;AAQA,QAAA,IAAG,CAAA,sBAAK,SAAS,CAAE,gBAAX,KAAqB,CAAtB,CAAP;AACE,UAAA,IAAC,CAAA,MAAM,CAAC,QAAR,CAAiB,SAAU,CAAA,CAAA,CAAE,CAAC,gBAAb,CAAA,CAA+B,CAAC,OAAhC,CAAA,CAAjB,CAAA,CADF;SARA;AAAA,QAWA,IAAC,CAAA,UAAD,GAAc,EAXd,CADW;MAAA,CAAb;;AAAA,8BAkBA,sBAAA,GAAwB,SAAA,GAAA;eACtB,IAAC,CAAA,mBADqB;MAAA,CAlBxB,CAAA;;AAAA,8BAyBA,IAAA,GAAM,SAAC,CAAD,GAAA;AACJ,YAAA,wBAAA;AAAA,QAAA,IAAG,CAAC,CAAC,CAAC,GAAG,CAAC,OAAN,KAAiB,IAAC,CAAA,EAAE,CAAC,SAAJ,CAAA,CAAlB,CAAA,IAAuC,CAAC,MAAA,CAAA,CAAQ,CAAC,GAAG,CAAC,SAAb,KAA4B,QAA7B,CAA1C;AACE;eAAA,gDAAA;iCAAA;AACE,YAAA,IAAG,IAAI,CAAC,SAAL,CAAA,CAAA,KAAsB,IAAC,CAAA,EAAE,CAAC,SAAJ,CAAA,CAAzB;4BACE,IAAI,CAAC,YAAL,CAAA,CAAmB,CAAC,OAApB,CAA4B,CAA5B,GADF;aAAA,MAAA;oCAAA;aADF;AAAA;0BADF;SADI;MAAA,CAzBN,CAAA;;AAAA,8BAmCA,OAAA,GAAS,SAAC,CAAD,GAAA;AACP,YAAA,YAAA;;yBAA8B;SAA9B;eACA,IAAC,CAAA,UAAW,CAAA,CAAC,CAAC,GAAG,CAAC,OAAN,CAAc,CAAC,IAA3B,CAAgC,CAAhC,EAFO;MAAA,CAnCT,CAAA;;AAAA,8BA0CA,QAAA,GAAU,SAAC,IAAD,GAAA;AACR,YAAA,IAAA;AAAA,QAAA,kDAAoB,CAAE,gBAAnB,GAA4B,CAA/B;iBACE,IAAC,CAAA,MAAM,CAAC,OAAR,CAAgB,IAAC,CAAA,UAAW,CAAA,IAAA,CAAK,CAAC,KAAlB,CAAA,CAAhB,EADF;SADQ;MAAA,CA1CV,CAAA;;AAAA,8BAiDA,cAAA,GAAgB,SAAA,GAAA;eACd,IAAC,CAAA,QAAD,CAAW,CAAC,CAAC,MAAF,CAAS,CAAT,EAAa,SAAS,CAAC,MAAV,GAAiB,CAA9B,CAAX,EADc;MAAA,CAjDhB,CAAA;;AAAA,8BAuDA,QAAA,GAAU,SAAA,GAAA;AACR,YAAA,YAAA;AAAA;AAAA,aAAA,SAAA;wBAAA;AACE,UAAA,IAAC,CAAA,MAAM,CAAC,QAAR,CAAiB,GAAjB,CAAA,CADF;AAAA,SAAA;eAEA,IAAC,CAAA,UAAD,GAAc,GAHN;MAAA,CAvDV,CAAA;;2BAAA;;SAda;EAAA,CAFjB,CAAA;AAAA","file":"Connectors/TestConnector.js","sourceRoot":"/source/","sourcesContent":["\n_ = require \"underscore\"\n\nmodule.exports = (user_list)->\n\n #\n # @nodoc\n # A trivial Connector that simulates network delay.\n #\n class TestConnector\n\n #\n # @param {Engine} engine The transformation engine\n # @param {HistoryBuffer} HB\n # @param {Array<Function>} execution_listener You must ensure that whenever an operation is executed, every function in this Array is called.\n # @param {Yatta} yatta The Yatta framework.\n #\n constructor: (@engine, @HB, @execution_listener)->\n send_ = (o)=>\n @send o\n @execution_listener.push send_\n\n @applied_operations = []\n appliedOperationsListener = (o)=>\n @applied_operations.push o\n @execution_listener.push appliedOperationsListener\n if not (user_list?.length is 0)\n @engine.applyOps user_list[0].getHistoryBuffer()._encode()\n\n @unexecuted = {}\n\n #\n # This engine applied operations in a specific order.\n # Get the ops in the right order.\n #\n getOpsInExecutionOrder: ()->\n @applied_operations\n\n #\n # This function is called whenever an operation was executed.\n # @param {Operation} o The operation that was executed.\n #\n send: (o)->\n if (o.uid.creator is @HB.getUserId()) and (typeof o.uid.op_number isnt \"string\")\n for user in user_list\n if user.getUserId() isnt @HB.getUserId()\n user.getConnector().receive(o)\n\n #\n # This function is called whenever an operation was received from another peer.\n # @param {Operation} o The operation that was received.\n #\n receive: (o)->\n @unexecuted[o.uid.creator] ?= []\n @unexecuted[o.uid.creator].push o\n\n #\n # Flush one operation from the line of a specific user.\n #\n flushOne: (user)->\n if @unexecuted[user]?.length > 0\n @engine.applyOp @unexecuted[user].shift()\n\n #\n # Flush one operation on a random line.\n #\n flushOneRandom: ()->\n @flushOne (_.random 0, (user_list.length-1))\n\n #\n # Flush all operations on every line.\n #\n flushAll: ()->\n for n,ops of @unexecuted\n @engine.applyOps ops\n @unexecuted = {}\n\n"]}
|
||||
@@ -1,110 +1,113 @@
|
||||
(function() {
|
||||
var Engine;
|
||||
var Engine;
|
||||
|
||||
Engine = (function() {
|
||||
function Engine(HB, parser) {
|
||||
this.HB = HB;
|
||||
this.parser = parser;
|
||||
this.unprocessed_ops = [];
|
||||
if (typeof window !== "undefined" && window !== null) {
|
||||
window.unprocessed_counter = 0;
|
||||
}
|
||||
|
||||
if (typeof window !== "undefined" && window !== null) {
|
||||
window.unprocessed_exec_counter = 0;
|
||||
}
|
||||
|
||||
if (typeof window !== "undefined" && window !== null) {
|
||||
window.unprocessed_types = [];
|
||||
}
|
||||
|
||||
Engine = (function() {
|
||||
function Engine(HB, types) {
|
||||
this.HB = HB;
|
||||
this.types = types;
|
||||
this.unprocessed_ops = [];
|
||||
}
|
||||
|
||||
Engine.prototype.parseOperation = function(json) {
|
||||
var type;
|
||||
type = this.types[json.type];
|
||||
if ((type != null ? type.parse : void 0) != null) {
|
||||
return type.parse(json);
|
||||
} else {
|
||||
throw new Error("You forgot to specify a parser for type " + json.type + ". The message is " + (JSON.stringify(json)) + ".");
|
||||
}
|
||||
};
|
||||
|
||||
Engine.prototype.parseOperation = function(json) {
|
||||
var typeParser;
|
||||
typeParser = this.parser[json.type];
|
||||
if (typeParser != null) {
|
||||
return typeParser(json);
|
||||
} else {
|
||||
throw new Error("You forgot to specify a parser for type " + json.type + ". The message is " + (JSON.stringify(json)) + ".");
|
||||
}
|
||||
};
|
||||
|
||||
Engine.prototype.applyOpsBundle = function(ops_json) {
|
||||
var o, ops, _i, _j, _k, _len, _len1, _len2;
|
||||
ops = [];
|
||||
for (_i = 0, _len = ops_json.length; _i < _len; _i++) {
|
||||
o = ops_json[_i];
|
||||
ops.push(this.parseOperation(o));
|
||||
}
|
||||
for (_j = 0, _len1 = ops.length; _j < _len1; _j++) {
|
||||
o = ops[_j];
|
||||
this.HB.addOperation(o);
|
||||
}
|
||||
for (_k = 0, _len2 = ops.length; _k < _len2; _k++) {
|
||||
o = ops[_k];
|
||||
if (!o.execute()) {
|
||||
this.unprocessed_ops.push(o);
|
||||
}
|
||||
}
|
||||
return this.tryUnprocessed();
|
||||
};
|
||||
/*
|
||||
applyOpsBundle: (ops_json)->
|
||||
ops = []
|
||||
for o in ops_json
|
||||
ops.push @parseOperation o
|
||||
for o in ops
|
||||
if not o.execute()
|
||||
@unprocessed_ops.push o
|
||||
@tryUnprocessed()
|
||||
*/
|
||||
|
||||
Engine.prototype.applyOpsCheckDouble = function(ops_json) {
|
||||
var o, _i, _len, _results;
|
||||
_results = [];
|
||||
for (_i = 0, _len = ops_json.length; _i < _len; _i++) {
|
||||
o = ops_json[_i];
|
||||
if (this.HB.getOperation(o.uid) == null) {
|
||||
_results.push(this.applyOp(o));
|
||||
} else {
|
||||
_results.push(void 0);
|
||||
}
|
||||
}
|
||||
return _results;
|
||||
};
|
||||
|
||||
Engine.prototype.applyOps = function(ops_json) {
|
||||
var o, _i, _len, _results;
|
||||
_results = [];
|
||||
for (_i = 0, _len = ops_json.length; _i < _len; _i++) {
|
||||
o = ops_json[_i];
|
||||
Engine.prototype.applyOpsCheckDouble = function(ops_json) {
|
||||
var o, _i, _len, _results;
|
||||
_results = [];
|
||||
for (_i = 0, _len = ops_json.length; _i < _len; _i++) {
|
||||
o = ops_json[_i];
|
||||
if (this.HB.getOperation(o.uid) == null) {
|
||||
_results.push(this.applyOp(o));
|
||||
}
|
||||
return _results;
|
||||
};
|
||||
|
||||
Engine.prototype.applyOp = function(op_json) {
|
||||
var o;
|
||||
o = this.parseOperation(op_json);
|
||||
this.HB.addToCounter(o);
|
||||
if (!o.execute()) {
|
||||
this.unprocessed_ops.push(o);
|
||||
} else {
|
||||
this.HB.addOperation(o);
|
||||
_results.push(void 0);
|
||||
}
|
||||
return this.tryUnprocessed();
|
||||
};
|
||||
}
|
||||
return _results;
|
||||
};
|
||||
|
||||
Engine.prototype.tryUnprocessed = function() {
|
||||
var old_length, op, unprocessed, _i, _len, _ref, _results;
|
||||
_results = [];
|
||||
while (true) {
|
||||
old_length = this.unprocessed_ops.length;
|
||||
unprocessed = [];
|
||||
_ref = this.unprocessed_ops;
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
op = _ref[_i];
|
||||
if (!op.execute()) {
|
||||
unprocessed.push(op);
|
||||
} else {
|
||||
this.HB.addOperation(op);
|
||||
}
|
||||
}
|
||||
this.unprocessed_ops = unprocessed;
|
||||
if (this.unprocessed_ops.length === old_length) {
|
||||
break;
|
||||
} else {
|
||||
_results.push(void 0);
|
||||
Engine.prototype.applyOps = function(ops_json) {
|
||||
return this.applyOp(ops_json);
|
||||
};
|
||||
|
||||
Engine.prototype.applyOp = function(op_json_array) {
|
||||
var o, op_json, _i, _len;
|
||||
if (op_json_array.constructor !== Array) {
|
||||
op_json_array = [op_json_array];
|
||||
}
|
||||
for (_i = 0, _len = op_json_array.length; _i < _len; _i++) {
|
||||
op_json = op_json_array[_i];
|
||||
o = this.parseOperation(op_json);
|
||||
if (op_json.fromHB != null) {
|
||||
o.fromHB = op_json.fromHB;
|
||||
}
|
||||
if (this.HB.getOperation(o) != null) {
|
||||
|
||||
} else if (((!this.HB.isExpectedOperation(o)) && (o.fromHB == null)) || (!o.execute())) {
|
||||
this.unprocessed_ops.push(o);
|
||||
if (typeof window !== "undefined" && window !== null) {
|
||||
window.unprocessed_types.push(o.type);
|
||||
}
|
||||
}
|
||||
return _results;
|
||||
};
|
||||
}
|
||||
return this.tryUnprocessed();
|
||||
};
|
||||
|
||||
return Engine;
|
||||
Engine.prototype.tryUnprocessed = function() {
|
||||
var old_length, op, unprocessed, _i, _len, _ref;
|
||||
while (true) {
|
||||
old_length = this.unprocessed_ops.length;
|
||||
unprocessed = [];
|
||||
_ref = this.unprocessed_ops;
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
op = _ref[_i];
|
||||
if (this.HB.getOperation(op) != null) {
|
||||
|
||||
})();
|
||||
} else if ((!this.HB.isExpectedOperation(op) && (op.fromHB == null)) || (!op.execute())) {
|
||||
unprocessed.push(op);
|
||||
}
|
||||
}
|
||||
this.unprocessed_ops = unprocessed;
|
||||
if (this.unprocessed_ops.length === old_length) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (this.unprocessed_ops.length !== 0) {
|
||||
return this.HB.invokeSync();
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = Engine;
|
||||
return Engine;
|
||||
|
||||
}).call(this);
|
||||
})();
|
||||
|
||||
//# sourceMappingURL=Engine.js.map
|
||||
module.exports = Engine;
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,95 +0,0 @@
|
||||
(function() {
|
||||
var Engine, HistoryBuffer, JsonFramework, json_types_uninitialized;
|
||||
|
||||
json_types_uninitialized = require("../Types/JsonTypes");
|
||||
|
||||
HistoryBuffer = require("../HistoryBuffer");
|
||||
|
||||
Engine = require("../Engine");
|
||||
|
||||
JsonFramework = (function() {
|
||||
function JsonFramework(user_id, Connector) {
|
||||
var first_word, type_manager;
|
||||
this.HB = new HistoryBuffer(user_id);
|
||||
type_manager = json_types_uninitialized(this.HB);
|
||||
this.types = type_manager.types;
|
||||
this.engine = new Engine(this.HB, type_manager.parser);
|
||||
this.connector = new Connector(this.engine, this.HB, type_manager.execution_listener, this);
|
||||
first_word = new this.types.JsonType(this.HB.getReservedUniqueIdentifier());
|
||||
this.HB.addOperation(first_word).execute();
|
||||
this.root_element = first_word;
|
||||
}
|
||||
|
||||
JsonFramework.prototype.getSharedObject = function() {
|
||||
return this.root_element;
|
||||
};
|
||||
|
||||
JsonFramework.prototype.getConnector = function() {
|
||||
return this.connector;
|
||||
};
|
||||
|
||||
JsonFramework.prototype.getHistoryBuffer = function() {
|
||||
return this.HB;
|
||||
};
|
||||
|
||||
JsonFramework.prototype.setMutableDefault = function(mutable) {
|
||||
return this.root_element.setMutableDefault(mutable);
|
||||
};
|
||||
|
||||
JsonFramework.prototype.getUserId = function() {
|
||||
return this.HB.getUserId();
|
||||
};
|
||||
|
||||
JsonFramework.prototype.toJson = function() {
|
||||
return this.root_element.toJson();
|
||||
};
|
||||
|
||||
JsonFramework.prototype.val = function(name, content, mutable) {
|
||||
return this.root_element.val(name, content, mutable);
|
||||
};
|
||||
|
||||
JsonFramework.prototype.on = function() {
|
||||
var _ref;
|
||||
return (_ref = this.root_element).on.apply(_ref, arguments);
|
||||
};
|
||||
|
||||
JsonFramework.prototype.deleteListener = function() {
|
||||
var _ref;
|
||||
return (_ref = this.root_element).deleteListener.apply(_ref, arguments);
|
||||
};
|
||||
|
||||
Object.defineProperty(JsonFramework.prototype, 'value', {
|
||||
get: function() {
|
||||
return this.root_element.value;
|
||||
},
|
||||
set: function(o) {
|
||||
var o_name, o_obj, _results;
|
||||
if (o.constructor === {}.constructor) {
|
||||
_results = [];
|
||||
for (o_name in o) {
|
||||
o_obj = o[o_name];
|
||||
_results.push(this.val(o_name, o_obj, 'immutable'));
|
||||
}
|
||||
return _results;
|
||||
} else {
|
||||
throw new Error("You must only set Object values!");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return JsonFramework;
|
||||
|
||||
})();
|
||||
|
||||
module.exports = JsonFramework;
|
||||
|
||||
if (typeof window !== "undefined" && window !== null) {
|
||||
if (window.Y == null) {
|
||||
window.Y = {};
|
||||
}
|
||||
window.Y.JsonFramework = JsonFramework;
|
||||
}
|
||||
|
||||
}).call(this);
|
||||
|
||||
//# sourceMappingURL=../Frameworks/JsonFramework.js.map
|
||||
@@ -1 +0,0 @@
|
||||
{"version":3,"sources":["Frameworks/JsonFramework.coffee"],"names":[],"mappings":"AACA;AAAA,MAAA,8DAAA;;AAAA,EAAA,wBAAA,GAA2B,OAAA,CAAQ,oBAAR,CAA3B,CAAA;;AAAA,EACA,aAAA,GAAgB,OAAA,CAAQ,kBAAR,CADhB,CAAA;;AAAA,EAEA,MAAA,GAAS,OAAA,CAAQ,WAAR,CAFT,CAAA;;AAAA,EAWM;AAMS,IAAA,uBAAC,OAAD,EAAU,SAAV,GAAA;AACX,UAAA,wBAAA;AAAA,MAAA,IAAC,CAAA,EAAD,GAAU,IAAA,aAAA,CAAc,OAAd,CAAV,CAAA;AAAA,MACA,YAAA,GAAe,wBAAA,CAAyB,IAAC,CAAA,EAA1B,CADf,CAAA;AAAA,MAEA,IAAC,CAAA,KAAD,GAAS,YAAY,CAAC,KAFtB,CAAA;AAAA,MAGA,IAAC,CAAA,MAAD,GAAc,IAAA,MAAA,CAAO,IAAC,CAAA,EAAR,EAAY,YAAY,CAAC,MAAzB,CAHd,CAAA;AAAA,MAIA,IAAC,CAAA,SAAD,GAAiB,IAAA,SAAA,CAAU,IAAC,CAAA,MAAX,EAAmB,IAAC,CAAA,EAApB,EAAwB,YAAY,CAAC,kBAArC,EAAyD,IAAzD,CAJjB,CAAA;AAAA,MAKA,UAAA,GAAiB,IAAA,IAAC,CAAA,KAAK,CAAC,QAAP,CAAgB,IAAC,CAAA,EAAE,CAAC,2BAAJ,CAAA,CAAhB,CALjB,CAAA;AAAA,MAMA,IAAC,CAAA,EAAE,CAAC,YAAJ,CAAiB,UAAjB,CAA4B,CAAC,OAA7B,CAAA,CANA,CAAA;AAAA,MAOA,IAAC,CAAA,YAAD,GAAgB,UAPhB,CADW;IAAA,CAAb;;AAAA,4BAaA,eAAA,GAAiB,SAAA,GAAA;aACf,IAAC,CAAA,aADc;IAAA,CAbjB,CAAA;;AAAA,4BAmBA,YAAA,GAAc,SAAA,GAAA;aACZ,IAAC,CAAA,UADW;IAAA,CAnBd,CAAA;;AAAA,4BAyBA,gBAAA,GAAkB,SAAA,GAAA;aAChB,IAAC,CAAA,GADe;IAAA,CAzBlB,CAAA;;AAAA,4BA+BA,iBAAA,GAAmB,SAAC,OAAD,GAAA;aACjB,IAAC,CAAA,YAAY,CAAC,iBAAd,CAAgC,OAAhC,EADiB;IAAA,CA/BnB,CAAA;;AAAA,4BAuCA,SAAA,GAAW,SAAA,GAAA;aACT,IAAC,CAAA,EAAE,CAAC,SAAJ,CAAA,EADS;IAAA,CAvCX,CAAA;;AAAA,4BA6CA,MAAA,GAAS,SAAA,GAAA;aACP,IAAC,CAAA,YAAY,CAAC,MAAd,CAAA,EADO;IAAA,CA7CT,CAAA;;AAAA,4BAmDA,GAAA,GAAM,SAAC,IAAD,EAAO,OAAP,EAAgB,OAAhB,GAAA;aACJ,IAAC,CAAA,YAAY,CAAC,GAAd,CAAkB,IAAlB,EAAwB,OAAxB,EAAiC,OAAjC,EADI;IAAA,CAnDN,CAAA;;AAAA,4BAyDA,EAAA,GAAI,SAAA,GAAA;AACF,UAAA,IAAA;aAAA,QAAA,IAAC,CAAA,YAAD,CAAa,CAAC,EAAd,aAAiB,SAAjB,EADE;IAAA,CAzDJ,CAAA;;AAAA,4BA+DA,cAAA,GAAgB,SAAA,GAAA;AACd,UAAA,IAAA;aAAA,QAAA,IAAC,CAAA,YAAD,CAAa,CAAC,cAAd,aAA6B,SAA7B,EADc;IAAA,CA/DhB,CAAA;;AAAA,IAqEA,MAAM,CAAC,cAAP,CAAsB,aAAa,CAAC,SAApC,EAA+C,OAA/C,EACE;AAAA,MAAA,GAAA,EAAM,SAAA,GAAA;eAAG,IAAC,CAAA,YAAY,CAAC,MAAjB;MAAA,CAAN;AAAA,MACA,GAAA,EAAM,SAAC,CAAD,GAAA;AACJ,YAAA,uBAAA;AAAA,QAAA,IAAG,CAAC,CAAC,WAAF,KAAiB,EAAE,CAAC,WAAvB;AACE;eAAA,WAAA;8BAAA;AACE,0BAAA,IAAC,CAAA,GAAD,CAAK,MAAL,EAAa,KAAb,EAAoB,WAApB,EAAA,CADF;AAAA;0BADF;SAAA,MAAA;AAIE,gBAAU,IAAA,KAAA,CAAM,kCAAN,CAAV,CAJF;SADI;MAAA,CADN;KADF,CArEA,CAAA;;yBAAA;;MAjBF,CAAA;;AAAA,EA+FA,MAAM,CAAC,OAAP,GAAiB,aA/FjB,CAAA;;AAgGA,EAAA,IAAG,gDAAH;AACE,IAAA,IAAO,gBAAP;AACE,MAAA,MAAM,CAAC,CAAP,GAAW,EAAX,CADF;KAAA;AAAA,IAEA,MAAM,CAAC,CAAC,CAAC,aAAT,GAAyB,aAFzB,CADF;GAhGA;AAAA","file":"Frameworks/JsonFramework.js","sourceRoot":"/source/","sourcesContent":["\njson_types_uninitialized = require \"../Types/JsonTypes\"\nHistoryBuffer = require \"../HistoryBuffer\"\nEngine = require \"../Engine\"\n\n#\n# Framework for Json data-structures.\n# Known values that are supported:\n# * String\n# * Integer\n# * Array\n#\nclass JsonFramework\n\n #\n # @param {String} user_id Unique id of the peer.\n # @param {Connector} Connector the connector class.\n #\n constructor: (user_id, Connector)->\n @HB = new HistoryBuffer user_id\n type_manager = json_types_uninitialized @HB\n @types = type_manager.types\n @engine = new Engine @HB, type_manager.parser\n @connector = new Connector @engine, @HB, type_manager.execution_listener, @\n first_word = new @types.JsonType @HB.getReservedUniqueIdentifier()\n @HB.addOperation(first_word).execute()\n @root_element = first_word\n\n #\n # @return JsonType\n #\n getSharedObject: ()->\n @root_element\n\n #\n # Get the initialized connector.\n #\n getConnector: ()->\n @connector\n\n #\n # @see HistoryBuffer\n #\n getHistoryBuffer: ()->\n @HB\n\n #\n # @see JsonType.setMutableDefault\n #\n setMutableDefault: (mutable)->\n @root_element.setMutableDefault(mutable)\n\n #\n # Get the UserId from the HistoryBuffer object.\n # In most cases this will be the same as the user_id value with which\n # JsonFramework was initialized (Depending on the HistoryBuffer implementation).\n #\n getUserId: ()->\n @HB.getUserId()\n\n #\n # @see JsonType.toJson\n #\n toJson : ()->\n @root_element.toJson()\n\n #\n # @see JsonType.val\n #\n val : (name, content, mutable)->\n @root_element.val(name, content, mutable)\n\n #\n # @see Operation.on\n #\n on: ()->\n @root_element.on arguments...\n\n #\n # @see Operation.deleteListener\n #\n deleteListener: ()->\n @root_element.deleteListener arguments...\n\n #\n # @see JsonType.value\n #\n Object.defineProperty JsonFramework.prototype, 'value',\n get : -> @root_element.value\n set : (o)->\n if o.constructor is {}.constructor\n for o_name,o_obj of o\n @val(o_name, o_obj, 'immutable')\n else\n throw new Error \"You must only set Object values!\"\n\nmodule.exports = JsonFramework\nif window?\n if not window.Y?\n window.Y = {}\n window.Y.JsonFramework = JsonFramework\n"]}
|
||||
@@ -1,111 +0,0 @@
|
||||
(function() {
|
||||
var Engine, HistoryBuffer, TextFramework, text_types_uninitialized;
|
||||
|
||||
text_types_uninitialized = require("../Types/TextTypes");
|
||||
|
||||
HistoryBuffer = require("../HistoryBuffer");
|
||||
|
||||
Engine = require("../Engine");
|
||||
|
||||
TextFramework = (function() {
|
||||
function TextFramework(user_id, Connector) {
|
||||
var beg, beginning, end, first_word, text_types, uid_beg, uid_end, uid_r;
|
||||
this.HB = new HistoryBuffer(user_id);
|
||||
text_types = text_types_uninitialized(this.HB);
|
||||
this.types = text_types.types;
|
||||
this.engine = new Engine(this.HB, text_types.parser);
|
||||
this.connector = new Connector(this.engine, this.HB, text_types.execution_listener, this);
|
||||
beginning = this.HB.addOperation(new this.types.Delimiter({
|
||||
creator: '_',
|
||||
op_number: '_beginning'
|
||||
}, void 0, void 0));
|
||||
end = this.HB.addOperation(new this.types.Delimiter({
|
||||
creator: '_',
|
||||
op_number: '_end'
|
||||
}, beginning, void 0));
|
||||
beginning.next_cl = end;
|
||||
beginning.execute();
|
||||
end.execute();
|
||||
first_word = new this.types.WordType({
|
||||
creator: '_',
|
||||
op_number: '_'
|
||||
}, beginning, end);
|
||||
this.HB.addOperation(first_word).execute();
|
||||
uid_r = {
|
||||
creator: '_',
|
||||
op_number: "RM"
|
||||
};
|
||||
uid_beg = {
|
||||
creator: '_',
|
||||
op_number: "_RM_beginning"
|
||||
};
|
||||
uid_end = {
|
||||
creator: '_',
|
||||
op_number: "_RM_end"
|
||||
};
|
||||
beg = this.HB.addOperation(new this.types.Delimiter(uid_beg, void 0, uid_end)).execute();
|
||||
end = this.HB.addOperation(new this.types.Delimiter(uid_end, beg, void 0)).execute();
|
||||
this.root_element = this.HB.addOperation(new this.types.ReplaceManager(void 0, uid_r, beg, end)).execute();
|
||||
this.root_element.replace(first_word, {
|
||||
creator: '_',
|
||||
op_number: 'Replaceable'
|
||||
});
|
||||
}
|
||||
|
||||
TextFramework.prototype.getSharedObject = function() {
|
||||
return this.root_element.val();
|
||||
};
|
||||
|
||||
TextFramework.prototype.getConnector = function() {
|
||||
return this.connector;
|
||||
};
|
||||
|
||||
TextFramework.prototype.getHistoryBuffer = function() {
|
||||
return this.HB;
|
||||
};
|
||||
|
||||
TextFramework.prototype.getUserId = function() {
|
||||
return this.HB.getUserId();
|
||||
};
|
||||
|
||||
TextFramework.prototype.val = function() {
|
||||
return this.getSharedObject().val();
|
||||
};
|
||||
|
||||
TextFramework.prototype.insertText = function(pos, content) {
|
||||
return this.getSharedObject().insertText(pos, content);
|
||||
};
|
||||
|
||||
TextFramework.prototype.deleteText = function(pos, length) {
|
||||
return this.getSharedObject().deleteText(pos, length);
|
||||
};
|
||||
|
||||
TextFramework.prototype.bind = function(textarea) {
|
||||
return this.getSharedObject().bind(textarea);
|
||||
};
|
||||
|
||||
TextFramework.prototype.replaceText = function(text) {
|
||||
return this.getSharedObject().replaceText(text);
|
||||
};
|
||||
|
||||
TextFramework.prototype.on = function() {
|
||||
var _ref;
|
||||
return (_ref = this.root_element).on.apply(_ref, arguments);
|
||||
};
|
||||
|
||||
return TextFramework;
|
||||
|
||||
})();
|
||||
|
||||
module.exports = TextFramework;
|
||||
|
||||
if (typeof window !== "undefined" && window !== null) {
|
||||
if (window.Y == null) {
|
||||
window.Y = {};
|
||||
}
|
||||
window.Y.TextFramework = TextFramework;
|
||||
}
|
||||
|
||||
}).call(this);
|
||||
|
||||
//# sourceMappingURL=../Frameworks/TextFramework.js.map
|
||||
File diff suppressed because one or more lines are too long
@@ -1,27 +1,105 @@
|
||||
(function() {
|
||||
var HistoryBuffer;
|
||||
var HistoryBuffer,
|
||||
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
|
||||
|
||||
HistoryBuffer = (function() {
|
||||
function HistoryBuffer(user_id) {
|
||||
this.user_id = user_id;
|
||||
this.operation_counter = {};
|
||||
this.buffer = {};
|
||||
this.change_listeners = [];
|
||||
HistoryBuffer = (function() {
|
||||
function HistoryBuffer(user_id) {
|
||||
this.user_id = user_id;
|
||||
this.emptyGarbage = __bind(this.emptyGarbage, this);
|
||||
this.operation_counter = {};
|
||||
this.buffer = {};
|
||||
this.change_listeners = [];
|
||||
this.garbage = [];
|
||||
this.trash = [];
|
||||
this.performGarbageCollection = true;
|
||||
this.garbageCollectTimeout = 30000;
|
||||
this.reserved_identifier_counter = 0;
|
||||
setTimeout(this.emptyGarbage, this.garbageCollectTimeout);
|
||||
}
|
||||
|
||||
HistoryBuffer.prototype.resetUserId = function(id) {
|
||||
var o, o_name, own;
|
||||
own = this.buffer[this.user_id];
|
||||
if (own != null) {
|
||||
for (o_name in own) {
|
||||
o = own[o_name];
|
||||
o.uid.creator = id;
|
||||
}
|
||||
if (this.buffer[id] != null) {
|
||||
throw new Error("You are re-assigning an old user id - this is not (yet) possible!");
|
||||
}
|
||||
this.buffer[id] = own;
|
||||
delete this.buffer[this.user_id];
|
||||
}
|
||||
this.operation_counter[id] = this.operation_counter[this.user_id];
|
||||
delete this.operation_counter[this.user_id];
|
||||
return this.user_id = id;
|
||||
};
|
||||
|
||||
HistoryBuffer.prototype.getUserId = function() {
|
||||
return this.user_id;
|
||||
HistoryBuffer.prototype.emptyGarbage = function() {
|
||||
var o, _i, _len, _ref;
|
||||
_ref = this.garbage;
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
o = _ref[_i];
|
||||
if (typeof o.cleanup === "function") {
|
||||
o.cleanup();
|
||||
}
|
||||
}
|
||||
this.garbage = this.trash;
|
||||
this.trash = [];
|
||||
if (this.garbageCollectTimeout !== -1) {
|
||||
this.garbageCollectTimeoutId = setTimeout(this.emptyGarbage, this.garbageCollectTimeout);
|
||||
}
|
||||
return void 0;
|
||||
};
|
||||
|
||||
HistoryBuffer.prototype.getUserId = function() {
|
||||
return this.user_id;
|
||||
};
|
||||
|
||||
HistoryBuffer.prototype.addToGarbageCollector = function() {
|
||||
var o, _i, _len, _results;
|
||||
if (this.performGarbageCollection) {
|
||||
_results = [];
|
||||
for (_i = 0, _len = arguments.length; _i < _len; _i++) {
|
||||
o = arguments[_i];
|
||||
if (o != null) {
|
||||
_results.push(this.garbage.push(o));
|
||||
} else {
|
||||
_results.push(void 0);
|
||||
}
|
||||
}
|
||||
return _results;
|
||||
}
|
||||
};
|
||||
|
||||
HistoryBuffer.prototype.stopGarbageCollection = function() {
|
||||
this.performGarbageCollection = false;
|
||||
this.setManualGarbageCollect();
|
||||
this.garbage = [];
|
||||
return this.trash = [];
|
||||
};
|
||||
|
||||
HistoryBuffer.prototype.setManualGarbageCollect = function() {
|
||||
this.garbageCollectTimeout = -1;
|
||||
clearTimeout(this.garbageCollectTimeoutId);
|
||||
return this.garbageCollectTimeoutId = void 0;
|
||||
};
|
||||
|
||||
HistoryBuffer.prototype.setGarbageCollectTimeout = function(garbageCollectTimeout) {
|
||||
this.garbageCollectTimeout = garbageCollectTimeout;
|
||||
};
|
||||
|
||||
HistoryBuffer.prototype.getReservedUniqueIdentifier = function() {
|
||||
return {
|
||||
creator: '_',
|
||||
op_number: "_" + (this.reserved_identifier_counter++),
|
||||
doSync: false
|
||||
};
|
||||
};
|
||||
|
||||
HistoryBuffer.prototype.getReservedUniqueIdentifier = function() {
|
||||
return {
|
||||
creator: '_',
|
||||
op_number: '_'
|
||||
};
|
||||
};
|
||||
|
||||
HistoryBuffer.prototype.getOperationCounter = function() {
|
||||
var ctn, res, user, _ref;
|
||||
HistoryBuffer.prototype.getOperationCounter = function(user_id) {
|
||||
var ctn, res, user, _ref;
|
||||
if (user_id == null) {
|
||||
res = {};
|
||||
_ref = this.operation_counter;
|
||||
for (user in _ref) {
|
||||
@@ -29,111 +107,144 @@
|
||||
res[user] = ctn;
|
||||
}
|
||||
return res;
|
||||
};
|
||||
} else {
|
||||
return this.operation_counter[user_id];
|
||||
}
|
||||
};
|
||||
|
||||
HistoryBuffer.prototype._encode = function(state_vector) {
|
||||
var json, o, o_json, o_next, o_number, o_prev, u_name, unknown, user, _ref;
|
||||
if (state_vector == null) {
|
||||
state_vector = {};
|
||||
HistoryBuffer.prototype.isExpectedOperation = function(o) {
|
||||
var _base, _name;
|
||||
if ((_base = this.operation_counter)[_name = o.uid.creator] == null) {
|
||||
_base[_name] = 0;
|
||||
}
|
||||
o.uid.op_number <= this.operation_counter[o.uid.creator];
|
||||
return true;
|
||||
};
|
||||
|
||||
HistoryBuffer.prototype._encode = function(state_vector) {
|
||||
var json, o, o_json, o_next, o_number, o_prev, u_name, unknown, user, _ref;
|
||||
if (state_vector == null) {
|
||||
state_vector = {};
|
||||
}
|
||||
json = [];
|
||||
unknown = function(user, o_number) {
|
||||
if ((user == null) || (o_number == null)) {
|
||||
throw new Error("dah!");
|
||||
}
|
||||
json = [];
|
||||
unknown = function(user, o_number) {
|
||||
if ((user == null) || (o_number == null)) {
|
||||
throw new Error("dah!");
|
||||
}
|
||||
return (state_vector[user] == null) || state_vector[user] <= o_number;
|
||||
};
|
||||
_ref = this.buffer;
|
||||
for (u_name in _ref) {
|
||||
user = _ref[u_name];
|
||||
for (o_number in user) {
|
||||
o = user[o_number];
|
||||
if ((!isNaN(parseInt(o_number))) && unknown(u_name, o_number)) {
|
||||
o_json = o._encode();
|
||||
if (o.next_cl != null) {
|
||||
o_next = o.next_cl;
|
||||
while ((o_next.next_cl != null) && unknown(o_next.creator, o_next.op_number)) {
|
||||
o_next = o_next.next_cl;
|
||||
}
|
||||
o_json.next = o_next.getUid();
|
||||
} else if (o.prev_cl != null) {
|
||||
o_prev = o.prev_cl;
|
||||
while ((o_prev.prev_cl != null) && unknown(o_prev.creator, o_prev.op_number)) {
|
||||
o_prev = o_prev.prev_cl;
|
||||
}
|
||||
o_json.prev = o_prev.getUid();
|
||||
return (state_vector[user] == null) || state_vector[user] <= o_number;
|
||||
};
|
||||
_ref = this.buffer;
|
||||
for (u_name in _ref) {
|
||||
user = _ref[u_name];
|
||||
for (o_number in user) {
|
||||
o = user[o_number];
|
||||
if (o.uid.doSync && unknown(u_name, o_number)) {
|
||||
o_json = o._encode();
|
||||
if (o.next_cl != null) {
|
||||
o_next = o.next_cl;
|
||||
while ((o_next.next_cl != null) && unknown(o_next.uid.creator, o_next.uid.op_number)) {
|
||||
o_next = o_next.next_cl;
|
||||
}
|
||||
json.push(o_json);
|
||||
o_json.next = o_next.getUid();
|
||||
} else if (o.prev_cl != null) {
|
||||
o_prev = o.prev_cl;
|
||||
while ((o_prev.prev_cl != null) && unknown(o_prev.uid.creator, o_prev.uid.op_number)) {
|
||||
o_prev = o_prev.prev_cl;
|
||||
}
|
||||
o_json.prev = o_prev.getUid();
|
||||
}
|
||||
json.push(o_json);
|
||||
}
|
||||
}
|
||||
return json;
|
||||
}
|
||||
return json;
|
||||
};
|
||||
|
||||
HistoryBuffer.prototype.getNextOperationIdentifier = function(user_id) {
|
||||
var uid;
|
||||
if (user_id == null) {
|
||||
user_id = this.user_id;
|
||||
}
|
||||
if (this.operation_counter[user_id] == null) {
|
||||
this.operation_counter[user_id] = 0;
|
||||
}
|
||||
uid = {
|
||||
'creator': user_id,
|
||||
'op_number': this.operation_counter[user_id],
|
||||
'doSync': true
|
||||
};
|
||||
this.operation_counter[user_id]++;
|
||||
return uid;
|
||||
};
|
||||
|
||||
HistoryBuffer.prototype.getNextOperationIdentifier = function(user_id) {
|
||||
var uid;
|
||||
if (user_id == null) {
|
||||
user_id = this.user_id;
|
||||
}
|
||||
if (this.operation_counter[user_id] == null) {
|
||||
this.operation_counter[user_id] = 0;
|
||||
}
|
||||
uid = {
|
||||
'creator': user_id,
|
||||
'op_number': this.operation_counter[user_id]
|
||||
};
|
||||
this.operation_counter[user_id]++;
|
||||
return uid;
|
||||
};
|
||||
|
||||
HistoryBuffer.prototype.getOperation = function(uid) {
|
||||
var _ref;
|
||||
if (uid instanceof Object) {
|
||||
return (_ref = this.buffer[uid.creator]) != null ? _ref[uid.op_number] : void 0;
|
||||
} else if (uid == null) {
|
||||
|
||||
} else {
|
||||
throw new Error("This type of uid is not defined!");
|
||||
}
|
||||
};
|
||||
|
||||
HistoryBuffer.prototype.addOperation = function(o) {
|
||||
if (this.buffer[o.creator] == null) {
|
||||
this.buffer[o.creator] = {};
|
||||
}
|
||||
if (this.buffer[o.creator][o.op_number] != null) {
|
||||
throw new Error("You must not overwrite operations!");
|
||||
}
|
||||
this.buffer[o.creator][o.op_number] = o;
|
||||
HistoryBuffer.prototype.getOperation = function(uid) {
|
||||
var o, _ref;
|
||||
if (uid.uid != null) {
|
||||
uid = uid.uid;
|
||||
}
|
||||
o = (_ref = this.buffer[uid.creator]) != null ? _ref[uid.op_number] : void 0;
|
||||
if ((uid.sub != null) && (o != null)) {
|
||||
return o.retrieveSub(uid.sub);
|
||||
} else {
|
||||
return o;
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
HistoryBuffer.prototype.addToCounter = function(o) {
|
||||
var _results;
|
||||
if (this.operation_counter[o.creator] == null) {
|
||||
this.operation_counter[o.creator] = 0;
|
||||
HistoryBuffer.prototype.addOperation = function(o) {
|
||||
if (this.buffer[o.uid.creator] == null) {
|
||||
this.buffer[o.uid.creator] = {};
|
||||
}
|
||||
if (this.buffer[o.uid.creator][o.uid.op_number] != null) {
|
||||
throw new Error("You must not overwrite operations!");
|
||||
}
|
||||
if ((o.uid.op_number.constructor !== String) && (!this.isExpectedOperation(o)) && (o.fromHB == null)) {
|
||||
throw new Error("this operation was not expected!");
|
||||
}
|
||||
this.addToCounter(o);
|
||||
this.buffer[o.uid.creator][o.uid.op_number] = o;
|
||||
return o;
|
||||
};
|
||||
|
||||
HistoryBuffer.prototype.removeOperation = function(o) {
|
||||
var _ref;
|
||||
return (_ref = this.buffer[o.uid.creator]) != null ? delete _ref[o.uid.op_number] : void 0;
|
||||
};
|
||||
|
||||
HistoryBuffer.prototype.setInvokeSyncHandler = function(f) {
|
||||
return this.invokeSync = f;
|
||||
};
|
||||
|
||||
HistoryBuffer.prototype.invokeSync = function() {};
|
||||
|
||||
HistoryBuffer.prototype.renewStateVector = function(state_vector) {
|
||||
var state, user, _results;
|
||||
_results = [];
|
||||
for (user in state_vector) {
|
||||
state = state_vector[user];
|
||||
if ((this.operation_counter[user] == null) || (this.operation_counter[user] < state_vector[user])) {
|
||||
_results.push(this.operation_counter[user] = state_vector[user]);
|
||||
} else {
|
||||
_results.push(void 0);
|
||||
}
|
||||
if (typeof o.op_number === 'number' && o.creator !== this.getUserId()) {
|
||||
if (o.op_number === this.operation_counter[o.creator]) {
|
||||
this.operation_counter[o.creator]++;
|
||||
_results = [];
|
||||
while (this.getOperation({
|
||||
creator: o.creator,
|
||||
op_number: this.operation_counter[o.creator]
|
||||
}) != null) {
|
||||
_results.push(this.operation_counter[o.creator]++);
|
||||
}
|
||||
return _results;
|
||||
}
|
||||
}
|
||||
return _results;
|
||||
};
|
||||
|
||||
HistoryBuffer.prototype.addToCounter = function(o) {
|
||||
if (this.operation_counter[o.uid.creator] == null) {
|
||||
this.operation_counter[o.uid.creator] = 0;
|
||||
}
|
||||
if (typeof o.uid.op_number === 'number' && o.uid.creator !== this.getUserId()) {
|
||||
if (o.uid.op_number === this.operation_counter[o.uid.creator]) {
|
||||
return this.operation_counter[o.uid.creator]++;
|
||||
} else {
|
||||
return this.invokeSync(o.uid.creator);
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
return HistoryBuffer;
|
||||
return HistoryBuffer;
|
||||
|
||||
})();
|
||||
})();
|
||||
|
||||
module.exports = HistoryBuffer;
|
||||
|
||||
}).call(this);
|
||||
|
||||
//# sourceMappingURL=HistoryBuffer.js.map
|
||||
module.exports = HistoryBuffer;
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,420 +1,487 @@
|
||||
(function() {
|
||||
var __slice = [].slice,
|
||||
__hasProp = {}.hasOwnProperty,
|
||||
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
|
||||
var __slice = [].slice,
|
||||
__hasProp = {}.hasOwnProperty,
|
||||
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
|
||||
|
||||
module.exports = function(HB) {
|
||||
var Delete, Delimiter, ImmutableObject, Insert, Operation, execution_listener, parser;
|
||||
parser = {};
|
||||
execution_listener = [];
|
||||
Operation = (function() {
|
||||
function Operation(uid) {
|
||||
if (uid == null) {
|
||||
uid = HB.getNextOperationIdentifier();
|
||||
}
|
||||
this.creator = uid['creator'], this.op_number = uid['op_number'];
|
||||
module.exports = function(HB) {
|
||||
var execution_listener, types;
|
||||
types = {};
|
||||
execution_listener = [];
|
||||
types.Operation = (function() {
|
||||
function Operation(uid) {
|
||||
this.is_deleted = false;
|
||||
this.garbage_collected = false;
|
||||
this.event_listeners = [];
|
||||
if (uid != null) {
|
||||
this.uid = uid;
|
||||
}
|
||||
}
|
||||
|
||||
Operation.prototype.on = function(events, f) {
|
||||
var e, _base, _i, _len, _results;
|
||||
if (this.event_listeners == null) {
|
||||
this.event_listeners = {};
|
||||
Operation.prototype.type = "Operation";
|
||||
|
||||
Operation.prototype.retrieveSub = function() {
|
||||
throw new Error("sub properties are not enable on this operation type!");
|
||||
};
|
||||
|
||||
Operation.prototype.observe = function(f) {
|
||||
return this.event_listeners.push(f);
|
||||
};
|
||||
|
||||
Operation.prototype.unobserve = function(f) {
|
||||
return this.event_listeners = this.event_listeners.filter(function(g) {
|
||||
return f !== g;
|
||||
});
|
||||
};
|
||||
|
||||
Operation.prototype.deleteAllObservers = function() {
|
||||
return this.event_listeners = [];
|
||||
};
|
||||
|
||||
Operation.prototype["delete"] = function() {
|
||||
(new types.Delete(void 0, this)).execute();
|
||||
return null;
|
||||
};
|
||||
|
||||
Operation.prototype.callEvent = function() {
|
||||
return this.forwardEvent.apply(this, [this].concat(__slice.call(arguments)));
|
||||
};
|
||||
|
||||
Operation.prototype.forwardEvent = function() {
|
||||
var args, f, op, _i, _len, _ref, _results;
|
||||
op = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
|
||||
_ref = this.event_listeners;
|
||||
_results = [];
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
f = _ref[_i];
|
||||
_results.push(f.call.apply(f, [op].concat(__slice.call(args))));
|
||||
}
|
||||
return _results;
|
||||
};
|
||||
|
||||
Operation.prototype.isDeleted = function() {
|
||||
return this.is_deleted;
|
||||
};
|
||||
|
||||
Operation.prototype.applyDelete = function(garbagecollect) {
|
||||
if (garbagecollect == null) {
|
||||
garbagecollect = true;
|
||||
}
|
||||
if (!this.garbage_collected) {
|
||||
this.is_deleted = true;
|
||||
if (garbagecollect) {
|
||||
this.garbage_collected = true;
|
||||
return HB.addToGarbageCollector(this);
|
||||
}
|
||||
if (events.constructor !== [].constructor) {
|
||||
events = [events];
|
||||
}
|
||||
_results = [];
|
||||
for (_i = 0, _len = events.length; _i < _len; _i++) {
|
||||
e = events[_i];
|
||||
if ((_base = this.event_listeners)[e] == null) {
|
||||
_base[e] = [];
|
||||
}
|
||||
_results.push(this.event_listeners[e].push(f));
|
||||
}
|
||||
return _results;
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
Operation.prototype.deleteListener = function(events, f) {
|
||||
var e, _i, _len, _ref, _results;
|
||||
if (events.constructor !== [].constructor) {
|
||||
events = [events];
|
||||
}
|
||||
_results = [];
|
||||
for (_i = 0, _len = events.length; _i < _len; _i++) {
|
||||
e = events[_i];
|
||||
if (((_ref = this.event_listeners) != null ? _ref[e] : void 0) != null) {
|
||||
_results.push(this.event_listeners[e] = this.event_listeners[e].filter(function(g) {
|
||||
return f !== g;
|
||||
}));
|
||||
} else {
|
||||
_results.push(void 0);
|
||||
}
|
||||
}
|
||||
return _results;
|
||||
};
|
||||
Operation.prototype.cleanup = function() {
|
||||
HB.removeOperation(this);
|
||||
return this.deleteAllObservers();
|
||||
};
|
||||
|
||||
Operation.prototype.callEvent = function() {
|
||||
return this.forwardEvent.apply(this, [this].concat(__slice.call(arguments)));
|
||||
};
|
||||
Operation.prototype.setParent = function(parent) {
|
||||
this.parent = parent;
|
||||
};
|
||||
|
||||
Operation.prototype.forwardEvent = function() {
|
||||
var args, event, f, op, _i, _len, _ref, _ref1, _results;
|
||||
op = arguments[0], event = arguments[1], args = 3 <= arguments.length ? __slice.call(arguments, 2) : [];
|
||||
if (((_ref = this.event_listeners) != null ? _ref[event] : void 0) != null) {
|
||||
_ref1 = this.event_listeners[event];
|
||||
_results = [];
|
||||
for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
|
||||
f = _ref1[_i];
|
||||
_results.push(f.call.apply(f, [op, event].concat(__slice.call(args))));
|
||||
}
|
||||
return _results;
|
||||
}
|
||||
};
|
||||
Operation.prototype.getParent = function() {
|
||||
return this.parent;
|
||||
};
|
||||
|
||||
Operation.prototype.setParent = function(parent) {
|
||||
this.parent = parent;
|
||||
};
|
||||
Operation.prototype.getUid = function() {
|
||||
if (this.uid.noOperation == null) {
|
||||
return this.uid;
|
||||
} else {
|
||||
return this.uid.alt;
|
||||
}
|
||||
};
|
||||
|
||||
Operation.prototype.getParent = function() {
|
||||
return this.parent;
|
||||
};
|
||||
Operation.prototype.cloneUid = function() {
|
||||
var n, uid, v, _ref;
|
||||
uid = {};
|
||||
_ref = this.getUid();
|
||||
for (n in _ref) {
|
||||
v = _ref[n];
|
||||
uid[n] = v;
|
||||
}
|
||||
return uid;
|
||||
};
|
||||
|
||||
Operation.prototype.getUid = function() {
|
||||
return {
|
||||
'creator': this.creator,
|
||||
'op_number': this.op_number
|
||||
};
|
||||
};
|
||||
Operation.prototype.dontSync = function() {
|
||||
return this.uid.doSync = false;
|
||||
};
|
||||
|
||||
Operation.prototype.execute = function() {
|
||||
var l, _i, _len;
|
||||
this.is_executed = true;
|
||||
Operation.prototype.execute = function() {
|
||||
var l, _i, _len;
|
||||
this.is_executed = true;
|
||||
if (this.uid == null) {
|
||||
this.uid = HB.getNextOperationIdentifier();
|
||||
}
|
||||
if (this.uid.noOperation == null) {
|
||||
HB.addOperation(this);
|
||||
for (_i = 0, _len = execution_listener.length; _i < _len; _i++) {
|
||||
l = execution_listener[_i];
|
||||
l(this._encode());
|
||||
}
|
||||
return this;
|
||||
};
|
||||
|
||||
Operation.prototype.saveOperation = function(name, op) {
|
||||
if ((op != null ? op.execute : void 0) != null) {
|
||||
return this[name] = op;
|
||||
} else if (op != null) {
|
||||
if (this.unchecked == null) {
|
||||
this.unchecked = {};
|
||||
}
|
||||
return this.unchecked[name] = op;
|
||||
}
|
||||
};
|
||||
|
||||
Operation.prototype.validateSavedOperations = function() {
|
||||
var name, op, op_uid, success, uninstantiated, _ref;
|
||||
uninstantiated = {};
|
||||
success = this;
|
||||
_ref = this.unchecked;
|
||||
for (name in _ref) {
|
||||
op_uid = _ref[name];
|
||||
op = HB.getOperation(op_uid);
|
||||
if (op) {
|
||||
this[name] = op;
|
||||
} else {
|
||||
uninstantiated[name] = op_uid;
|
||||
success = false;
|
||||
}
|
||||
}
|
||||
delete this.unchecked;
|
||||
if (!success) {
|
||||
this.unchecked = uninstantiated;
|
||||
}
|
||||
return success;
|
||||
};
|
||||
|
||||
return Operation;
|
||||
|
||||
})();
|
||||
Delete = (function(_super) {
|
||||
__extends(Delete, _super);
|
||||
|
||||
function Delete(uid, deletes) {
|
||||
this.saveOperation('deletes', deletes);
|
||||
Delete.__super__.constructor.call(this, uid);
|
||||
}
|
||||
return this;
|
||||
};
|
||||
|
||||
Delete.prototype._encode = function() {
|
||||
return {
|
||||
'type': "Delete",
|
||||
'uid': this.getUid(),
|
||||
'deletes': this.deletes.getUid()
|
||||
};
|
||||
Operation.prototype.saveOperation = function(name, op) {
|
||||
if ((op != null ? op.execute : void 0) != null) {
|
||||
return this[name] = op;
|
||||
} else if (op != null) {
|
||||
if (this.unchecked == null) {
|
||||
this.unchecked = {};
|
||||
}
|
||||
return this.unchecked[name] = op;
|
||||
}
|
||||
};
|
||||
|
||||
Operation.prototype.validateSavedOperations = function() {
|
||||
var name, op, op_uid, success, uninstantiated, _ref;
|
||||
uninstantiated = {};
|
||||
success = this;
|
||||
_ref = this.unchecked;
|
||||
for (name in _ref) {
|
||||
op_uid = _ref[name];
|
||||
op = HB.getOperation(op_uid);
|
||||
if (op) {
|
||||
this[name] = op;
|
||||
} else {
|
||||
uninstantiated[name] = op_uid;
|
||||
success = false;
|
||||
}
|
||||
}
|
||||
delete this.unchecked;
|
||||
if (!success) {
|
||||
this.unchecked = uninstantiated;
|
||||
}
|
||||
return success;
|
||||
};
|
||||
|
||||
return Operation;
|
||||
|
||||
})();
|
||||
types.Delete = (function(_super) {
|
||||
__extends(Delete, _super);
|
||||
|
||||
function Delete(uid, deletes) {
|
||||
this.saveOperation('deletes', deletes);
|
||||
Delete.__super__.constructor.call(this, uid);
|
||||
}
|
||||
|
||||
Delete.prototype.type = "Delete";
|
||||
|
||||
Delete.prototype._encode = function() {
|
||||
return {
|
||||
'type': "Delete",
|
||||
'uid': this.getUid(),
|
||||
'deletes': this.deletes.getUid()
|
||||
};
|
||||
};
|
||||
|
||||
Delete.prototype.execute = function() {
|
||||
if (this.validateSavedOperations()) {
|
||||
Delete.prototype.execute = function() {
|
||||
var res;
|
||||
if (this.validateSavedOperations()) {
|
||||
res = Delete.__super__.execute.apply(this, arguments);
|
||||
if (res) {
|
||||
this.deletes.applyDelete(this);
|
||||
return Delete.__super__.execute.apply(this, arguments);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
return Delete;
|
||||
|
||||
})(Operation);
|
||||
parser['Delete'] = function(o) {
|
||||
var deletes_uid, uid;
|
||||
uid = o['uid'], deletes_uid = o['deletes'];
|
||||
return new Delete(uid, deletes_uid);
|
||||
};
|
||||
Insert = (function(_super) {
|
||||
__extends(Insert, _super);
|
||||
|
||||
function Insert(uid, prev_cl, next_cl, origin) {
|
||||
this.saveOperation('prev_cl', prev_cl);
|
||||
this.saveOperation('next_cl', next_cl);
|
||||
if (origin != null) {
|
||||
this.saveOperation('origin', origin);
|
||||
} else {
|
||||
this.saveOperation('origin', prev_cl);
|
||||
}
|
||||
Insert.__super__.constructor.call(this, uid);
|
||||
}
|
||||
|
||||
Insert.prototype.applyDelete = function(o) {
|
||||
if (this.deleted_by == null) {
|
||||
this.deleted_by = [];
|
||||
}
|
||||
this.deleted_by.push(o);
|
||||
if ((this.parent != null) && this.deleted_by.length === 1) {
|
||||
return this.parent.callEvent("delete", this);
|
||||
}
|
||||
};
|
||||
|
||||
Insert.prototype.isDeleted = function() {
|
||||
var _ref;
|
||||
return ((_ref = this.deleted_by) != null ? _ref.length : void 0) > 0;
|
||||
};
|
||||
|
||||
Insert.prototype.getDistanceToOrigin = function() {
|
||||
var d, o;
|
||||
d = 0;
|
||||
o = this.prev_cl;
|
||||
while (true) {
|
||||
if (this.origin === o) {
|
||||
break;
|
||||
}
|
||||
d++;
|
||||
if (this === this.prev_cl) {
|
||||
throw new Error("this should not happen ;) ");
|
||||
}
|
||||
o = o.prev_cl;
|
||||
}
|
||||
return d;
|
||||
};
|
||||
|
||||
Insert.prototype.update_sl = function() {
|
||||
var o;
|
||||
o = this.prev_cl;
|
||||
({
|
||||
update: function(dest_cl, dest_sl) {
|
||||
var _results;
|
||||
_results = [];
|
||||
while (true) {
|
||||
if (o.isDeleted()) {
|
||||
_results.push(o = o[dest_cl]);
|
||||
} else {
|
||||
this[dest_sl] = o;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return _results;
|
||||
}
|
||||
});
|
||||
update("prev_cl", "prev_sl");
|
||||
return update("next_cl", "prev_sl");
|
||||
};
|
||||
|
||||
Insert.prototype.execute = function() {
|
||||
var distance_to_origin, i, o, parent, _ref, _ref1, _ref2;
|
||||
if (this.is_executed != null) {
|
||||
return this;
|
||||
}
|
||||
if (!this.validateSavedOperations()) {
|
||||
return false;
|
||||
} else {
|
||||
if (((_ref = this.prev_cl) != null ? _ref.validateSavedOperations() : void 0) && ((_ref1 = this.next_cl) != null ? _ref1.validateSavedOperations() : void 0) && this.prev_cl.next_cl !== this) {
|
||||
distance_to_origin = 0;
|
||||
o = this.prev_cl.next_cl;
|
||||
i = 0;
|
||||
while (true) {
|
||||
if (o == null) {
|
||||
console.log(JSON.stringify(this.prev_cl.getUid()));
|
||||
console.log(JSON.stringify(this.next_cl.getUid()));
|
||||
}
|
||||
if (o !== this.next_cl) {
|
||||
if (o.getDistanceToOrigin() === i) {
|
||||
if (o.creator < this.creator) {
|
||||
this.prev_cl = o;
|
||||
distance_to_origin = i + 1;
|
||||
} else {
|
||||
|
||||
}
|
||||
} else if (o.getDistanceToOrigin() < i) {
|
||||
if (i - distance_to_origin <= o.getDistanceToOrigin()) {
|
||||
this.prev_cl = o;
|
||||
distance_to_origin = i + 1;
|
||||
} else {
|
||||
|
||||
}
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
i++;
|
||||
o = o.next_cl;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
this.next_cl = this.prev_cl.next_cl;
|
||||
this.prev_cl.next_cl = this;
|
||||
this.next_cl.prev_cl = this;
|
||||
}
|
||||
parent = (_ref2 = this.prev_cl) != null ? _ref2.getParent() : void 0;
|
||||
if (parent != null) {
|
||||
this.setParent(parent);
|
||||
this.parent.callEvent("insert", this);
|
||||
}
|
||||
return Insert.__super__.execute.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
Insert.prototype.getPosition = function() {
|
||||
var position, prev;
|
||||
position = 0;
|
||||
prev = this.prev_cl;
|
||||
while (true) {
|
||||
if (prev instanceof Delimiter) {
|
||||
break;
|
||||
}
|
||||
if ((prev.isDeleted != null) && !prev.isDeleted()) {
|
||||
position++;
|
||||
}
|
||||
prev = prev.prev_cl;
|
||||
}
|
||||
return position;
|
||||
};
|
||||
|
||||
return Insert;
|
||||
|
||||
})(Operation);
|
||||
ImmutableObject = (function(_super) {
|
||||
__extends(ImmutableObject, _super);
|
||||
|
||||
function ImmutableObject(uid, content, prev, next, origin) {
|
||||
this.content = content;
|
||||
ImmutableObject.__super__.constructor.call(this, uid, prev, next, origin);
|
||||
}
|
||||
|
||||
ImmutableObject.prototype.val = function() {
|
||||
return this.content;
|
||||
};
|
||||
|
||||
ImmutableObject.prototype._encode = function() {
|
||||
var json;
|
||||
json = {
|
||||
'type': "ImmutableObject",
|
||||
'uid': this.getUid(),
|
||||
'content': this.content
|
||||
};
|
||||
if (this.prev_cl != null) {
|
||||
json['prev'] = this.prev_cl.getUid();
|
||||
}
|
||||
if (this.next_cl != null) {
|
||||
json['next'] = this.next_cl.getUid();
|
||||
}
|
||||
if ((this.origin != null) && this.origin !== this.prev_cl) {
|
||||
json["origin"] = this.origin.getUid();
|
||||
}
|
||||
return json;
|
||||
};
|
||||
|
||||
return ImmutableObject;
|
||||
|
||||
})(Insert);
|
||||
parser['ImmutableObject'] = function(json) {
|
||||
var content, next, origin, prev, uid;
|
||||
uid = json['uid'], content = json['content'], prev = json['prev'], next = json['next'], origin = json['origin'];
|
||||
return new ImmutableObject(uid, content, prev, next, origin);
|
||||
};
|
||||
Delimiter = (function(_super) {
|
||||
__extends(Delimiter, _super);
|
||||
|
||||
function Delimiter(uid, prev_cl, next_cl, origin) {
|
||||
this.saveOperation('prev_cl', prev_cl);
|
||||
this.saveOperation('next_cl', next_cl);
|
||||
this.saveOperation('origin', prev_cl);
|
||||
Delimiter.__super__.constructor.call(this, uid);
|
||||
}
|
||||
|
||||
Delimiter.prototype.isDeleted = function() {
|
||||
return res;
|
||||
} else {
|
||||
return false;
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
Delimiter.prototype.execute = function() {
|
||||
var _ref, _ref1;
|
||||
if (((_ref = this.unchecked) != null ? _ref['next_cl'] : void 0) != null) {
|
||||
return Delimiter.__super__.execute.apply(this, arguments);
|
||||
} else if ((_ref1 = this.unchecked) != null ? _ref1['prev_cl'] : void 0) {
|
||||
if (this.validateSavedOperations()) {
|
||||
if (this.prev_cl.next_cl != null) {
|
||||
throw new Error("Probably duplicated operations");
|
||||
}
|
||||
this.prev_cl.next_cl = this;
|
||||
delete this.prev_cl.unchecked.next_cl;
|
||||
return Delimiter.__super__.execute.apply(this, arguments);
|
||||
} else {
|
||||
return false;
|
||||
return Delete;
|
||||
|
||||
})(types.Operation);
|
||||
types.Delete.parse = function(o) {
|
||||
var deletes_uid, uid;
|
||||
uid = o['uid'], deletes_uid = o['deletes'];
|
||||
return new this(uid, deletes_uid);
|
||||
};
|
||||
types.Insert = (function(_super) {
|
||||
__extends(Insert, _super);
|
||||
|
||||
function Insert(uid, prev_cl, next_cl, origin, parent) {
|
||||
this.saveOperation('parent', parent);
|
||||
this.saveOperation('prev_cl', prev_cl);
|
||||
this.saveOperation('next_cl', next_cl);
|
||||
if (origin != null) {
|
||||
this.saveOperation('origin', origin);
|
||||
} else {
|
||||
this.saveOperation('origin', prev_cl);
|
||||
}
|
||||
Insert.__super__.constructor.call(this, uid);
|
||||
}
|
||||
|
||||
Insert.prototype.type = "Insert";
|
||||
|
||||
Insert.prototype.applyDelete = function(o) {
|
||||
var callLater, garbagecollect, _ref;
|
||||
if (this.deleted_by == null) {
|
||||
this.deleted_by = [];
|
||||
}
|
||||
callLater = false;
|
||||
if ((this.parent != null) && !this.isDeleted() && (o != null)) {
|
||||
callLater = true;
|
||||
}
|
||||
if (o != null) {
|
||||
this.deleted_by.push(o);
|
||||
}
|
||||
garbagecollect = false;
|
||||
if (this.next_cl.isDeleted()) {
|
||||
garbagecollect = true;
|
||||
}
|
||||
Insert.__super__.applyDelete.call(this, garbagecollect);
|
||||
if (callLater) {
|
||||
this.callOperationSpecificDeleteEvents(o);
|
||||
}
|
||||
if ((_ref = this.prev_cl) != null ? _ref.isDeleted() : void 0) {
|
||||
return this.prev_cl.applyDelete();
|
||||
}
|
||||
};
|
||||
|
||||
Insert.prototype.cleanup = function() {
|
||||
var d, o, _i, _len, _ref;
|
||||
if (this.next_cl.isDeleted()) {
|
||||
_ref = this.deleted_by;
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
d = _ref[_i];
|
||||
d.cleanup();
|
||||
}
|
||||
o = this.next_cl;
|
||||
while (o.type !== "Delimiter") {
|
||||
if (o.origin === this) {
|
||||
o.origin = this.prev_cl;
|
||||
}
|
||||
} else if ((this.prev_cl != null) && (this.prev_cl.next_cl == null)) {
|
||||
delete this.prev_cl.unchecked.next_cl;
|
||||
return this.prev_cl.next_cl = this;
|
||||
} else if ((this.prev_cl != null) || (this.next_cl != null)) {
|
||||
o = o.next_cl;
|
||||
}
|
||||
this.prev_cl.next_cl = this.next_cl;
|
||||
this.next_cl.prev_cl = this.prev_cl;
|
||||
return Insert.__super__.cleanup.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
Insert.prototype.getDistanceToOrigin = function() {
|
||||
var d, o;
|
||||
d = 0;
|
||||
o = this.prev_cl;
|
||||
while (true) {
|
||||
if (this.origin === o) {
|
||||
break;
|
||||
}
|
||||
d++;
|
||||
o = o.prev_cl;
|
||||
}
|
||||
return d;
|
||||
};
|
||||
|
||||
Insert.prototype.execute = function() {
|
||||
var distance_to_origin, i, o;
|
||||
if (!this.validateSavedOperations()) {
|
||||
return false;
|
||||
} else {
|
||||
if (this.parent != null) {
|
||||
if (this.prev_cl == null) {
|
||||
this.prev_cl = this.parent.beginning;
|
||||
}
|
||||
if (this.origin == null) {
|
||||
this.origin = this.parent.beginning;
|
||||
}
|
||||
if (this.next_cl == null) {
|
||||
this.next_cl = this.parent.end;
|
||||
}
|
||||
}
|
||||
if (this.prev_cl != null) {
|
||||
distance_to_origin = this.getDistanceToOrigin();
|
||||
o = this.prev_cl.next_cl;
|
||||
i = distance_to_origin;
|
||||
while (true) {
|
||||
if (o !== this.next_cl) {
|
||||
if (o.getDistanceToOrigin() === i) {
|
||||
if (o.uid.creator < this.uid.creator) {
|
||||
this.prev_cl = o;
|
||||
distance_to_origin = i + 1;
|
||||
} else {
|
||||
|
||||
}
|
||||
} else if (o.getDistanceToOrigin() < i) {
|
||||
if (i - distance_to_origin <= o.getDistanceToOrigin()) {
|
||||
this.prev_cl = o;
|
||||
distance_to_origin = i + 1;
|
||||
} else {
|
||||
|
||||
}
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
i++;
|
||||
o = o.next_cl;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
this.next_cl = this.prev_cl.next_cl;
|
||||
this.prev_cl.next_cl = this;
|
||||
this.next_cl.prev_cl = this;
|
||||
}
|
||||
this.setParent(this.prev_cl.getParent());
|
||||
Insert.__super__.execute.apply(this, arguments);
|
||||
this.callOperationSpecificInsertEvents();
|
||||
return this;
|
||||
}
|
||||
};
|
||||
|
||||
Insert.prototype.callOperationSpecificInsertEvents = function() {
|
||||
var _ref;
|
||||
return (_ref = this.parent) != null ? _ref.callEvent([
|
||||
{
|
||||
type: "insert",
|
||||
position: this.getPosition(),
|
||||
object: this.parent,
|
||||
changedBy: this.uid.creator,
|
||||
value: this.content
|
||||
}
|
||||
]) : void 0;
|
||||
};
|
||||
|
||||
Insert.prototype.callOperationSpecificDeleteEvents = function(o) {
|
||||
return this.parent.callEvent([
|
||||
{
|
||||
type: "delete",
|
||||
position: this.getPosition(),
|
||||
object: this.parent,
|
||||
length: 1,
|
||||
changedBy: o.uid.creator
|
||||
}
|
||||
]);
|
||||
};
|
||||
|
||||
Insert.prototype.getPosition = function() {
|
||||
var position, prev;
|
||||
position = 0;
|
||||
prev = this.prev_cl;
|
||||
while (true) {
|
||||
if (prev instanceof types.Delimiter) {
|
||||
break;
|
||||
}
|
||||
if (!prev.isDeleted()) {
|
||||
position++;
|
||||
}
|
||||
prev = prev.prev_cl;
|
||||
}
|
||||
return position;
|
||||
};
|
||||
|
||||
return Insert;
|
||||
|
||||
})(types.Operation);
|
||||
types.ImmutableObject = (function(_super) {
|
||||
__extends(ImmutableObject, _super);
|
||||
|
||||
function ImmutableObject(uid, content) {
|
||||
this.content = content;
|
||||
ImmutableObject.__super__.constructor.call(this, uid);
|
||||
}
|
||||
|
||||
ImmutableObject.prototype.type = "ImmutableObject";
|
||||
|
||||
ImmutableObject.prototype.val = function() {
|
||||
return this.content;
|
||||
};
|
||||
|
||||
ImmutableObject.prototype._encode = function() {
|
||||
var json;
|
||||
json = {
|
||||
'type': this.type,
|
||||
'uid': this.getUid(),
|
||||
'content': this.content
|
||||
};
|
||||
return json;
|
||||
};
|
||||
|
||||
return ImmutableObject;
|
||||
|
||||
})(types.Operation);
|
||||
types.ImmutableObject.parse = function(json) {
|
||||
var content, uid;
|
||||
uid = json['uid'], content = json['content'];
|
||||
return new this(uid, content);
|
||||
};
|
||||
types.Delimiter = (function(_super) {
|
||||
__extends(Delimiter, _super);
|
||||
|
||||
function Delimiter(prev_cl, next_cl, origin) {
|
||||
this.saveOperation('prev_cl', prev_cl);
|
||||
this.saveOperation('next_cl', next_cl);
|
||||
this.saveOperation('origin', prev_cl);
|
||||
Delimiter.__super__.constructor.call(this, {
|
||||
noOperation: true
|
||||
});
|
||||
}
|
||||
|
||||
Delimiter.prototype.type = "Delimiter";
|
||||
|
||||
Delimiter.prototype.applyDelete = function() {
|
||||
var o;
|
||||
Delimiter.__super__.applyDelete.call(this);
|
||||
o = this.prev_cl;
|
||||
while (o != null) {
|
||||
o.applyDelete();
|
||||
o = o.prev_cl;
|
||||
}
|
||||
return void 0;
|
||||
};
|
||||
|
||||
Delimiter.prototype.cleanup = function() {
|
||||
return Delimiter.__super__.cleanup.call(this);
|
||||
};
|
||||
|
||||
Delimiter.prototype.execute = function() {
|
||||
var _ref, _ref1;
|
||||
if (((_ref = this.unchecked) != null ? _ref['next_cl'] : void 0) != null) {
|
||||
return Delimiter.__super__.execute.apply(this, arguments);
|
||||
} else if ((_ref1 = this.unchecked) != null ? _ref1['prev_cl'] : void 0) {
|
||||
if (this.validateSavedOperations()) {
|
||||
if (this.prev_cl.next_cl != null) {
|
||||
throw new Error("Probably duplicated operations");
|
||||
}
|
||||
this.prev_cl.next_cl = this;
|
||||
return Delimiter.__super__.execute.apply(this, arguments);
|
||||
} else {
|
||||
throw new Error("Delimiter is unsufficient defined!");
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
Delimiter.prototype._encode = function() {
|
||||
var _ref, _ref1;
|
||||
return {
|
||||
'type': "Delimiter",
|
||||
'uid': this.getUid(),
|
||||
'prev': (_ref = this.prev_cl) != null ? _ref.getUid() : void 0,
|
||||
'next': (_ref1 = this.next_cl) != null ? _ref1.getUid() : void 0
|
||||
};
|
||||
};
|
||||
|
||||
return Delimiter;
|
||||
|
||||
})(Operation);
|
||||
parser['Delimiter'] = function(json) {
|
||||
var next, prev, uid;
|
||||
uid = json['uid'], prev = json['prev'], next = json['next'];
|
||||
return new Delimiter(uid, prev, next);
|
||||
} else if ((this.prev_cl != null) && (this.prev_cl.next_cl == null)) {
|
||||
delete this.prev_cl.unchecked.next_cl;
|
||||
this.prev_cl.next_cl = this;
|
||||
return Delimiter.__super__.execute.apply(this, arguments);
|
||||
} else if ((this.prev_cl != null) || (this.next_cl != null) || true) {
|
||||
return Delimiter.__super__.execute.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
return {
|
||||
'types': {
|
||||
'Delete': Delete,
|
||||
'Insert': Insert,
|
||||
'Delimiter': Delimiter,
|
||||
'Operation': Operation,
|
||||
'ImmutableObject': ImmutableObject
|
||||
},
|
||||
'parser': parser,
|
||||
'execution_listener': execution_listener
|
||||
|
||||
Delimiter.prototype._encode = function() {
|
||||
var _ref, _ref1;
|
||||
return {
|
||||
'type': this.type,
|
||||
'uid': this.getUid(),
|
||||
'prev': (_ref = this.prev_cl) != null ? _ref.getUid() : void 0,
|
||||
'next': (_ref1 = this.next_cl) != null ? _ref1.getUid() : void 0
|
||||
};
|
||||
};
|
||||
|
||||
return Delimiter;
|
||||
|
||||
})(types.Operation);
|
||||
types.Delimiter.parse = function(json) {
|
||||
var next, prev, uid;
|
||||
uid = json['uid'], prev = json['prev'], next = json['next'];
|
||||
return new this(uid, prev, next);
|
||||
};
|
||||
|
||||
}).call(this);
|
||||
|
||||
//# sourceMappingURL=../Types/BasicTypes.js.map
|
||||
return {
|
||||
'types': types,
|
||||
'execution_listener': execution_listener
|
||||
};
|
||||
};
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,206 +1,158 @@
|
||||
(function() {
|
||||
var text_types_uninitialized,
|
||||
__hasProp = {}.hasOwnProperty,
|
||||
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
__slice = [].slice;
|
||||
var text_types_uninitialized,
|
||||
__hasProp = {}.hasOwnProperty,
|
||||
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
|
||||
|
||||
text_types_uninitialized = require("./TextTypes");
|
||||
text_types_uninitialized = require("./TextTypes");
|
||||
|
||||
module.exports = function(HB) {
|
||||
var JsonType, createJsonTypeWrapper, parser, text_types, types;
|
||||
text_types = text_types_uninitialized(HB);
|
||||
types = text_types.types;
|
||||
parser = text_types.parser;
|
||||
createJsonTypeWrapper = function(_jsonType) {
|
||||
var JsonTypeWrapper;
|
||||
JsonTypeWrapper = (function() {
|
||||
function JsonTypeWrapper(jsonType) {
|
||||
var name, obj, _fn, _ref;
|
||||
_ref = jsonType.map;
|
||||
_fn = function(name, obj) {
|
||||
return Object.defineProperty(JsonTypeWrapper.prototype, name, {
|
||||
get: function() {
|
||||
var x;
|
||||
x = obj.val();
|
||||
if (x instanceof JsonType) {
|
||||
return createJsonTypeWrapper(x);
|
||||
} else if (x instanceof types.ImmutableObject) {
|
||||
return x.val();
|
||||
} else {
|
||||
return x;
|
||||
}
|
||||
},
|
||||
set: function(o) {
|
||||
var o_name, o_obj, overwrite, _results;
|
||||
overwrite = jsonType.val(name);
|
||||
if (o.constructor === {}.constructor && overwrite instanceof types.Operation) {
|
||||
_results = [];
|
||||
for (o_name in o) {
|
||||
o_obj = o[o_name];
|
||||
_results.push(overwrite.val(o_name, o_obj, 'immutable'));
|
||||
}
|
||||
return _results;
|
||||
} else {
|
||||
return jsonType.val(name, o, 'immutable');
|
||||
}
|
||||
},
|
||||
enumerable: true,
|
||||
configurable: false
|
||||
});
|
||||
};
|
||||
for (name in _ref) {
|
||||
obj = _ref[name];
|
||||
_fn(name, obj);
|
||||
}
|
||||
}
|
||||
module.exports = function(HB) {
|
||||
var text_types, types;
|
||||
text_types = text_types_uninitialized(HB);
|
||||
types = text_types.types;
|
||||
types.Object = (function(_super) {
|
||||
__extends(Object, _super);
|
||||
|
||||
return JsonTypeWrapper;
|
||||
function Object() {
|
||||
return Object.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
})();
|
||||
return new JsonTypeWrapper(_jsonType);
|
||||
Object.prototype.type = "Object";
|
||||
|
||||
Object.prototype.applyDelete = function() {
|
||||
return Object.__super__.applyDelete.call(this);
|
||||
};
|
||||
JsonType = (function(_super) {
|
||||
__extends(JsonType, _super);
|
||||
|
||||
function JsonType(uid, initial_value, mutable) {
|
||||
var name, o;
|
||||
JsonType.__super__.constructor.call(this, uid);
|
||||
if (initial_value != null) {
|
||||
if (typeof initial_value !== "object") {
|
||||
throw new Error("The initial value of JsonTypes must be of type Object! (current type: " + (typeof initial_value) + ")");
|
||||
}
|
||||
for (name in initial_value) {
|
||||
o = initial_value[name];
|
||||
this.val(name, o, mutable);
|
||||
}
|
||||
}
|
||||
Object.prototype.cleanup = function() {
|
||||
return Object.__super__.cleanup.call(this);
|
||||
};
|
||||
|
||||
Object.prototype.toJson = function(transform_to_value) {
|
||||
var json, name, o, that, val;
|
||||
if (transform_to_value == null) {
|
||||
transform_to_value = false;
|
||||
}
|
||||
|
||||
JsonType.prototype.type = "JsonType";
|
||||
|
||||
JsonType.prototype.toJson = function() {
|
||||
var json, name, o, val;
|
||||
if ((this.bound_json == null) || (Object.observe == null) || true) {
|
||||
val = this.val();
|
||||
json = {};
|
||||
for (name in val) {
|
||||
o = val[name];
|
||||
if (o.constructor === {}.constructor) {
|
||||
json[name] = this.val(name).toJson();
|
||||
} else if (o instanceof types.Operation) {
|
||||
while (o instanceof types.Operation) {
|
||||
o = o.val();
|
||||
}
|
||||
json[name] = o;
|
||||
if (o instanceof types.Object) {
|
||||
json[name] = o.toJson(transform_to_value);
|
||||
} else if (o instanceof types.Array) {
|
||||
json[name] = o.toJson(transform_to_value);
|
||||
} else if (transform_to_value && o instanceof types.Operation) {
|
||||
json[name] = o.val();
|
||||
} else {
|
||||
json[name] = o;
|
||||
}
|
||||
}
|
||||
return json;
|
||||
};
|
||||
|
||||
JsonType.prototype.setReplaceManager = function(rm) {
|
||||
this.parent = rm.parent;
|
||||
return this.on(['change', 'addProperty'], function() {
|
||||
var _ref;
|
||||
return (_ref = rm.parent).forwardEvent.apply(_ref, [this].concat(__slice.call(arguments)));
|
||||
});
|
||||
};
|
||||
|
||||
JsonType.prototype.getParent = function() {
|
||||
return this.parent;
|
||||
};
|
||||
|
||||
JsonType.prototype.mutable_default = true;
|
||||
|
||||
JsonType.prototype.setMutableDefault = function(mutable) {
|
||||
if (mutable === true || mutable === 'mutable') {
|
||||
JsonType.prototype.mutable_default = true;
|
||||
} else if (mutable === false || mutable === 'immutable') {
|
||||
JsonType.prototype.mutable_default = false;
|
||||
} else {
|
||||
throw new Error('Set mutable either "mutable" or "immutable"!');
|
||||
}
|
||||
return 'OK';
|
||||
};
|
||||
|
||||
JsonType.prototype.val = function(name, content, mutable) {
|
||||
var json, o, o_name, obj, word;
|
||||
if (typeof name === 'object') {
|
||||
for (o_name in name) {
|
||||
o = name[o_name];
|
||||
this.val(o_name, o, content);
|
||||
}
|
||||
return this;
|
||||
} else if ((name != null) && (content != null)) {
|
||||
if (mutable != null) {
|
||||
if (mutable === true || mutable === 'mutable') {
|
||||
mutable = true;
|
||||
} else {
|
||||
mutable = false;
|
||||
}
|
||||
} else {
|
||||
mutable = this.mutable_default;
|
||||
}
|
||||
if (typeof content === 'function') {
|
||||
return this;
|
||||
} else if (((!mutable) || typeof content === 'number') && content.constructor !== Object) {
|
||||
obj = HB.addOperation(new types.ImmutableObject(void 0, content)).execute();
|
||||
return JsonType.__super__.val.call(this, name, obj);
|
||||
} else {
|
||||
if (typeof content === 'string') {
|
||||
word = HB.addOperation(new types.WordType(void 0)).execute();
|
||||
word.insertText(0, content);
|
||||
return JsonType.__super__.val.call(this, name, word);
|
||||
} else if (content.constructor === Object) {
|
||||
json = HB.addOperation(new JsonType(void 0, content, mutable)).execute();
|
||||
return JsonType.__super__.val.call(this, name, json);
|
||||
} else {
|
||||
throw new Error("You must not set " + (typeof content) + "-types in collaborative Json-objects!");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return JsonType.__super__.val.call(this, name, content);
|
||||
}
|
||||
};
|
||||
|
||||
Object.defineProperty(JsonType.prototype, 'value', {
|
||||
get: function() {
|
||||
return createJsonTypeWrapper(this);
|
||||
},
|
||||
set: function(o) {
|
||||
var o_name, o_obj, _results;
|
||||
if (o.constructor === {}.constructor) {
|
||||
this.bound_json = json;
|
||||
if (Object.observe != null) {
|
||||
that = this;
|
||||
Object.observe(this.bound_json, function(events) {
|
||||
var event, _i, _len, _results;
|
||||
_results = [];
|
||||
for (o_name in o) {
|
||||
o_obj = o[o_name];
|
||||
_results.push(this.val(o_name, o_obj, 'immutable'));
|
||||
for (_i = 0, _len = events.length; _i < _len; _i++) {
|
||||
event = events[_i];
|
||||
if ((event.changedBy == null) && (event.type === "add" || (event.type = "update"))) {
|
||||
_results.push(that.val(event.name, event.object[event.name]));
|
||||
} else {
|
||||
_results.push(void 0);
|
||||
}
|
||||
}
|
||||
return _results;
|
||||
} else {
|
||||
throw new Error("You must only set Object values!");
|
||||
}
|
||||
});
|
||||
this.observe(function(events) {
|
||||
var event, notifier, oldVal, _i, _len, _results;
|
||||
_results = [];
|
||||
for (_i = 0, _len = events.length; _i < _len; _i++) {
|
||||
event = events[_i];
|
||||
if (event.created_ !== HB.getUserId()) {
|
||||
notifier = Object.getNotifier(that.bound_json);
|
||||
oldVal = that.bound_json[event.name];
|
||||
if (oldVal != null) {
|
||||
notifier.performChange('update', function() {
|
||||
return that.bound_json[event.name] = that.val(event.name);
|
||||
}, that.bound_json);
|
||||
_results.push(notifier.notify({
|
||||
object: that.bound_json,
|
||||
type: 'update',
|
||||
name: event.name,
|
||||
oldValue: oldVal,
|
||||
changedBy: event.changedBy
|
||||
}));
|
||||
} else {
|
||||
notifier.performChange('add', function() {
|
||||
return that.bound_json[event.name] = that.val(event.name);
|
||||
}, that.bound_json);
|
||||
_results.push(notifier.notify({
|
||||
object: that.bound_json,
|
||||
type: 'add',
|
||||
name: event.name,
|
||||
oldValue: oldVal,
|
||||
changedBy: event.changedBy
|
||||
}));
|
||||
}
|
||||
} else {
|
||||
_results.push(void 0);
|
||||
}
|
||||
}
|
||||
return _results;
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
JsonType.prototype._encode = function() {
|
||||
return {
|
||||
'type': "JsonType",
|
||||
'uid': this.getUid()
|
||||
};
|
||||
};
|
||||
|
||||
return JsonType;
|
||||
|
||||
})(types.MapManager);
|
||||
parser['JsonType'] = function(json) {
|
||||
var uid;
|
||||
uid = json['uid'];
|
||||
return new JsonType(uid);
|
||||
}
|
||||
return this.bound_json;
|
||||
};
|
||||
types['JsonType'] = JsonType;
|
||||
return text_types;
|
||||
|
||||
Object.prototype.val = function(name, content) {
|
||||
var args, i, o, type, _i, _ref;
|
||||
if ((name != null) && arguments.length > 1) {
|
||||
if ((content != null) && (content.constructor != null)) {
|
||||
type = types[content.constructor.name];
|
||||
if ((type != null) && (type.create != null)) {
|
||||
args = [];
|
||||
for (i = _i = 1, _ref = arguments.length; 1 <= _ref ? _i < _ref : _i > _ref; i = 1 <= _ref ? ++_i : --_i) {
|
||||
args.push(arguments[i]);
|
||||
}
|
||||
o = type.create.apply(null, args);
|
||||
return Object.__super__.val.call(this, name, o);
|
||||
} else {
|
||||
throw new Error("The " + content.constructor.name + "-type is not (yet) supported in Y.");
|
||||
}
|
||||
} else {
|
||||
return Object.__super__.val.call(this, name, content);
|
||||
}
|
||||
} else {
|
||||
return Object.__super__.val.call(this, name);
|
||||
}
|
||||
};
|
||||
|
||||
Object.prototype._encode = function() {
|
||||
return {
|
||||
'type': this.type,
|
||||
'uid': this.getUid()
|
||||
};
|
||||
};
|
||||
|
||||
return Object;
|
||||
|
||||
})(types.MapManager);
|
||||
types.Object.parse = function(json) {
|
||||
var uid;
|
||||
uid = json['uid'];
|
||||
return new this(uid);
|
||||
};
|
||||
|
||||
}).call(this);
|
||||
|
||||
//# sourceMappingURL=../Types/JsonTypes.js.map
|
||||
types.Object.create = function(content, mutable) {
|
||||
var json, n, o;
|
||||
json = new types.Object().execute();
|
||||
for (n in content) {
|
||||
o = content[n];
|
||||
json.val(n, o, mutable);
|
||||
}
|
||||
return json;
|
||||
};
|
||||
types.Number = {};
|
||||
types.Number.create = function(content) {
|
||||
return content;
|
||||
};
|
||||
return text_types;
|
||||
};
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,314 +1,354 @@
|
||||
(function() {
|
||||
var basic_types_uninitialized,
|
||||
__hasProp = {}.hasOwnProperty,
|
||||
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
|
||||
var basic_types_uninitialized,
|
||||
__hasProp = {}.hasOwnProperty,
|
||||
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
|
||||
|
||||
basic_types_uninitialized = require("./BasicTypes");
|
||||
basic_types_uninitialized = require("./BasicTypes");
|
||||
|
||||
module.exports = function(HB) {
|
||||
var AddName, ListManager, MapManager, ReplaceManager, Replaceable, basic_types, parser, types;
|
||||
basic_types = basic_types_uninitialized(HB);
|
||||
types = basic_types.types;
|
||||
parser = basic_types.parser;
|
||||
MapManager = (function(_super) {
|
||||
__extends(MapManager, _super);
|
||||
module.exports = function(HB) {
|
||||
var basic_types, types;
|
||||
basic_types = basic_types_uninitialized(HB);
|
||||
types = basic_types.types;
|
||||
types.MapManager = (function(_super) {
|
||||
__extends(MapManager, _super);
|
||||
|
||||
function MapManager(uid) {
|
||||
this.map = {};
|
||||
MapManager.__super__.constructor.call(this, uid);
|
||||
function MapManager(uid) {
|
||||
this.map = {};
|
||||
MapManager.__super__.constructor.call(this, uid);
|
||||
}
|
||||
|
||||
MapManager.prototype.type = "MapManager";
|
||||
|
||||
MapManager.prototype.applyDelete = function() {
|
||||
var name, p, _ref;
|
||||
_ref = this.map;
|
||||
for (name in _ref) {
|
||||
p = _ref[name];
|
||||
p.applyDelete();
|
||||
}
|
||||
|
||||
MapManager.prototype.val = function(name, content) {
|
||||
var o, obj, result, _ref, _ref1;
|
||||
if (content != null) {
|
||||
if (this.map[name] == null) {
|
||||
HB.addOperation(new AddName(void 0, this, name)).execute();
|
||||
}
|
||||
this.map[name].replace(content);
|
||||
return this;
|
||||
} else if (name != null) {
|
||||
obj = (_ref = this.map[name]) != null ? _ref.val() : void 0;
|
||||
if (obj instanceof types.ImmutableObject) {
|
||||
return obj.val();
|
||||
} else {
|
||||
return obj;
|
||||
}
|
||||
} else {
|
||||
result = {};
|
||||
_ref1 = this.map;
|
||||
for (name in _ref1) {
|
||||
o = _ref1[name];
|
||||
obj = o.val();
|
||||
if (obj instanceof types.ImmutableObject || obj instanceof MapManager) {
|
||||
obj = obj.val();
|
||||
}
|
||||
result[name] = obj;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
};
|
||||
|
||||
return MapManager;
|
||||
|
||||
})(types.Operation);
|
||||
AddName = (function(_super) {
|
||||
__extends(AddName, _super);
|
||||
|
||||
function AddName(uid, map_manager, name) {
|
||||
this.name = name;
|
||||
this.saveOperation('map_manager', map_manager);
|
||||
AddName.__super__.constructor.call(this, uid);
|
||||
}
|
||||
|
||||
AddName.prototype.execute = function() {
|
||||
var beg, end, uid_beg, uid_end, uid_r;
|
||||
if (!this.validateSavedOperations()) {
|
||||
return false;
|
||||
} else {
|
||||
uid_r = this.map_manager.getUid();
|
||||
uid_r.op_number = "_" + uid_r.op_number + "_RM_" + this.name;
|
||||
if (HB.getOperation(uid_r) == null) {
|
||||
uid_beg = this.map_manager.getUid();
|
||||
uid_beg.op_number = "_" + uid_beg.op_number + "_RM_" + this.name + "_beginning";
|
||||
uid_end = this.map_manager.getUid();
|
||||
uid_end.op_number = "_" + uid_end.op_number + "_RM_" + this.name + "_end";
|
||||
beg = HB.addOperation(new types.Delimiter(uid_beg, void 0, uid_end)).execute();
|
||||
end = HB.addOperation(new types.Delimiter(uid_end, beg, void 0)).execute();
|
||||
this.map_manager.map[this.name] = HB.addOperation(new ReplaceManager(void 0, uid_r, beg, end));
|
||||
this.map_manager.map[this.name].setParent(this.map_manager, this.name);
|
||||
this.map_manager.map[this.name].execute();
|
||||
}
|
||||
return AddName.__super__.execute.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
AddName.prototype._encode = function() {
|
||||
return {
|
||||
'type': "AddName",
|
||||
'uid': this.getUid(),
|
||||
'map_manager': this.map_manager.getUid(),
|
||||
'name': this.name
|
||||
};
|
||||
};
|
||||
|
||||
return AddName;
|
||||
|
||||
})(types.Operation);
|
||||
parser['AddName'] = function(json) {
|
||||
var map_manager, name, uid;
|
||||
map_manager = json['map_manager'], uid = json['uid'], name = json['name'];
|
||||
return new AddName(uid, map_manager, name);
|
||||
return MapManager.__super__.applyDelete.call(this);
|
||||
};
|
||||
ListManager = (function(_super) {
|
||||
__extends(ListManager, _super);
|
||||
|
||||
function ListManager(uid, beginning, end, prev, next, origin) {
|
||||
if ((beginning != null) && (end != null)) {
|
||||
this.saveOperation('beginning', beginning);
|
||||
this.saveOperation('end', end);
|
||||
MapManager.prototype.cleanup = function() {
|
||||
return MapManager.__super__.cleanup.call(this);
|
||||
};
|
||||
|
||||
MapManager.prototype.val = function(name, content) {
|
||||
var o, prop, result, _ref;
|
||||
if (arguments.length > 1) {
|
||||
this.retrieveSub(name).replace(content);
|
||||
return this;
|
||||
} else if (name != null) {
|
||||
prop = this.map[name];
|
||||
if ((prop != null) && !prop.isContentDeleted()) {
|
||||
return prop.val();
|
||||
} else {
|
||||
this.beginning = HB.addOperation(new types.Delimiter(void 0, void 0, void 0));
|
||||
this.end = HB.addOperation(new types.Delimiter(void 0, this.beginning, void 0));
|
||||
this.beginning.next_cl = this.end;
|
||||
this.beginning.execute();
|
||||
this.end.execute();
|
||||
return void 0;
|
||||
}
|
||||
ListManager.__super__.constructor.call(this, uid, prev, next, origin);
|
||||
}
|
||||
|
||||
ListManager.prototype.execute = function() {
|
||||
if (this.validateSavedOperations()) {
|
||||
this.beginning.setParent(this);
|
||||
this.end.setParent(this);
|
||||
return ListManager.__super__.execute.apply(this, arguments);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
ListManager.prototype.getLastOperation = function() {
|
||||
return this.end.prev_cl;
|
||||
};
|
||||
|
||||
ListManager.prototype.getFirstOperation = function() {
|
||||
return this.beginning.next_cl;
|
||||
};
|
||||
|
||||
ListManager.prototype.toArray = function() {
|
||||
var o, result;
|
||||
o = this.beginning.next_cl;
|
||||
result = [];
|
||||
while (o !== this.end) {
|
||||
result.push(o);
|
||||
o = o.next_cl;
|
||||
} else {
|
||||
result = {};
|
||||
_ref = this.map;
|
||||
for (name in _ref) {
|
||||
o = _ref[name];
|
||||
if (!o.isContentDeleted()) {
|
||||
result[name] = o.val();
|
||||
}
|
||||
}
|
||||
return result;
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
ListManager.prototype.getOperationByPosition = function(position) {
|
||||
var o;
|
||||
o = this.beginning.next_cl;
|
||||
if ((position > 0 || o.isDeleted()) && !(o instanceof types.Delimiter)) {
|
||||
while (o.isDeleted() && !(o instanceof types.Delimiter)) {
|
||||
o = o.next_cl;
|
||||
}
|
||||
while (true) {
|
||||
if (o instanceof types.Delimiter) {
|
||||
break;
|
||||
}
|
||||
if (position <= 0 && !o.isDeleted()) {
|
||||
break;
|
||||
}
|
||||
o = o.next_cl;
|
||||
if (!o.isDeleted()) {
|
||||
position -= 1;
|
||||
}
|
||||
MapManager.prototype["delete"] = function(name) {
|
||||
var _ref;
|
||||
if ((_ref = this.map[name]) != null) {
|
||||
_ref.deleteContent();
|
||||
}
|
||||
return this;
|
||||
};
|
||||
|
||||
MapManager.prototype.retrieveSub = function(property_name) {
|
||||
var event_properties, event_this, map_uid, rm, rm_uid;
|
||||
if (this.map[property_name] == null) {
|
||||
event_properties = {
|
||||
name: property_name
|
||||
};
|
||||
event_this = this;
|
||||
map_uid = this.cloneUid();
|
||||
map_uid.sub = property_name;
|
||||
rm_uid = {
|
||||
noOperation: true,
|
||||
alt: map_uid
|
||||
};
|
||||
rm = new types.ReplaceManager(event_properties, event_this, rm_uid);
|
||||
this.map[property_name] = rm;
|
||||
rm.setParent(this, property_name);
|
||||
rm.execute();
|
||||
}
|
||||
return this.map[property_name];
|
||||
};
|
||||
|
||||
return MapManager;
|
||||
|
||||
})(types.Operation);
|
||||
types.ListManager = (function(_super) {
|
||||
__extends(ListManager, _super);
|
||||
|
||||
function ListManager(uid) {
|
||||
this.beginning = new types.Delimiter(void 0, void 0);
|
||||
this.end = new types.Delimiter(this.beginning, void 0);
|
||||
this.beginning.next_cl = this.end;
|
||||
this.beginning.execute();
|
||||
this.end.execute();
|
||||
ListManager.__super__.constructor.call(this, uid);
|
||||
}
|
||||
|
||||
ListManager.prototype.type = "ListManager";
|
||||
|
||||
ListManager.prototype.execute = function() {
|
||||
if (this.validateSavedOperations()) {
|
||||
this.beginning.setParent(this);
|
||||
this.end.setParent(this);
|
||||
return ListManager.__super__.execute.apply(this, arguments);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
ListManager.prototype.getLastOperation = function() {
|
||||
return this.end.prev_cl;
|
||||
};
|
||||
|
||||
ListManager.prototype.getFirstOperation = function() {
|
||||
return this.beginning.next_cl;
|
||||
};
|
||||
|
||||
ListManager.prototype.toArray = function() {
|
||||
var o, result;
|
||||
o = this.beginning.next_cl;
|
||||
result = [];
|
||||
while (o !== this.end) {
|
||||
result.push(o);
|
||||
o = o.next_cl;
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
ListManager.prototype.getOperationByPosition = function(position) {
|
||||
var o;
|
||||
o = this.beginning;
|
||||
while (true) {
|
||||
if (o instanceof types.Delimiter && (o.prev_cl != null)) {
|
||||
o = o.prev_cl;
|
||||
while (o.isDeleted() || !(o instanceof types.Delimiter)) {
|
||||
o = o.prev_cl;
|
||||
}
|
||||
break;
|
||||
}
|
||||
return o;
|
||||
};
|
||||
|
||||
return ListManager;
|
||||
|
||||
})(types.Insert);
|
||||
ReplaceManager = (function(_super) {
|
||||
__extends(ReplaceManager, _super);
|
||||
|
||||
function ReplaceManager(initial_content, uid, beginning, end, prev, next, origin) {
|
||||
ReplaceManager.__super__.constructor.call(this, uid, beginning, end, prev, next, origin);
|
||||
if (initial_content != null) {
|
||||
this.replace(initial_content);
|
||||
if (position <= 0 && !o.isDeleted()) {
|
||||
break;
|
||||
}
|
||||
o = o.next_cl;
|
||||
if (!o.isDeleted()) {
|
||||
position -= 1;
|
||||
}
|
||||
}
|
||||
|
||||
ReplaceManager.prototype.replace = function(content, replaceable_uid) {
|
||||
var o, op;
|
||||
o = this.getLastOperation();
|
||||
op = new Replaceable(content, this, replaceable_uid, o, o.next_cl);
|
||||
return HB.addOperation(op).execute();
|
||||
};
|
||||
|
||||
ReplaceManager.prototype.setParent = function(parent, property_name) {
|
||||
var addPropertyListener;
|
||||
this.on('insert', (function(_this) {
|
||||
return function(event, op) {
|
||||
if (op.next_cl instanceof types.Delimiter) {
|
||||
return _this.parent.callEvent('change', property_name);
|
||||
}
|
||||
};
|
||||
})(this));
|
||||
this.on('change', (function(_this) {
|
||||
return function(event) {
|
||||
return _this.parent.callEvent('change', property_name);
|
||||
};
|
||||
})(this));
|
||||
addPropertyListener = (function(_this) {
|
||||
return function(event, op) {
|
||||
if (op.next_cl instanceof types.Delimiter && op.prev_cl instanceof types.Delimiter) {
|
||||
_this.parent.callEvent('addProperty', property_name);
|
||||
}
|
||||
return _this.deleteListener('addProperty', addPropertyListener);
|
||||
};
|
||||
})(this);
|
||||
this.on('insert', addPropertyListener);
|
||||
return ReplaceManager.__super__.setParent.call(this, parent);
|
||||
};
|
||||
|
||||
ReplaceManager.prototype.val = function() {
|
||||
var o;
|
||||
o = this.getLastOperation();
|
||||
return typeof o.val === "function" ? o.val() : void 0;
|
||||
};
|
||||
|
||||
ReplaceManager.prototype._encode = function() {
|
||||
var json;
|
||||
json = {
|
||||
'type': "ReplaceManager",
|
||||
'uid': this.getUid(),
|
||||
'beginning': this.beginning.getUid(),
|
||||
'end': this.end.getUid()
|
||||
};
|
||||
if ((this.prev_cl != null) && (this.next_cl != null)) {
|
||||
json['prev'] = this.prev_cl.getUid();
|
||||
json['next'] = this.next_cl.getUid();
|
||||
}
|
||||
if ((this.origin != null) && this.origin !== this.prev_cl) {
|
||||
json["origin"] = this.origin.getUid();
|
||||
}
|
||||
return json;
|
||||
};
|
||||
|
||||
return ReplaceManager;
|
||||
|
||||
})(ListManager);
|
||||
parser["ReplaceManager"] = function(json) {
|
||||
var beginning, content, end, next, origin, prev, uid;
|
||||
content = json['content'], uid = json['uid'], prev = json['prev'], next = json['next'], origin = json['origin'], beginning = json['beginning'], end = json['end'];
|
||||
return new ReplaceManager(content, uid, beginning, end, prev, next, origin);
|
||||
return o;
|
||||
};
|
||||
Replaceable = (function(_super) {
|
||||
__extends(Replaceable, _super);
|
||||
|
||||
function Replaceable(content, parent, uid, prev, next, origin) {
|
||||
return ListManager;
|
||||
|
||||
})(types.Operation);
|
||||
types.ReplaceManager = (function(_super) {
|
||||
__extends(ReplaceManager, _super);
|
||||
|
||||
function ReplaceManager(event_properties, event_this, uid, beginning, end) {
|
||||
this.event_properties = event_properties;
|
||||
this.event_this = event_this;
|
||||
if (this.event_properties['object'] == null) {
|
||||
this.event_properties['object'] = this.event_this;
|
||||
}
|
||||
ReplaceManager.__super__.constructor.call(this, uid, beginning, end);
|
||||
}
|
||||
|
||||
ReplaceManager.prototype.type = "ReplaceManager";
|
||||
|
||||
ReplaceManager.prototype.applyDelete = function() {
|
||||
var o;
|
||||
o = this.beginning;
|
||||
while (o != null) {
|
||||
o.applyDelete();
|
||||
o = o.next_cl;
|
||||
}
|
||||
return ReplaceManager.__super__.applyDelete.call(this);
|
||||
};
|
||||
|
||||
ReplaceManager.prototype.cleanup = function() {
|
||||
return ReplaceManager.__super__.cleanup.call(this);
|
||||
};
|
||||
|
||||
ReplaceManager.prototype.callEventDecorator = function(events) {
|
||||
var event, name, prop, _i, _len, _ref;
|
||||
if (!this.isDeleted()) {
|
||||
for (_i = 0, _len = events.length; _i < _len; _i++) {
|
||||
event = events[_i];
|
||||
_ref = this.event_properties;
|
||||
for (name in _ref) {
|
||||
prop = _ref[name];
|
||||
event[name] = prop;
|
||||
}
|
||||
}
|
||||
this.event_this.callEvent(events);
|
||||
}
|
||||
return void 0;
|
||||
};
|
||||
|
||||
ReplaceManager.prototype.replace = function(content, replaceable_uid) {
|
||||
var o, relp;
|
||||
o = this.getLastOperation();
|
||||
relp = (new types.Replaceable(content, this, replaceable_uid, o, o.next_cl)).execute();
|
||||
return void 0;
|
||||
};
|
||||
|
||||
ReplaceManager.prototype.isContentDeleted = function() {
|
||||
return this.getLastOperation().isDeleted();
|
||||
};
|
||||
|
||||
ReplaceManager.prototype.deleteContent = function() {
|
||||
(new types.Delete(void 0, this.getLastOperation().uid)).execute();
|
||||
return void 0;
|
||||
};
|
||||
|
||||
ReplaceManager.prototype.val = function() {
|
||||
var o;
|
||||
o = this.getLastOperation();
|
||||
return typeof o.val === "function" ? o.val() : void 0;
|
||||
};
|
||||
|
||||
ReplaceManager.prototype._encode = function() {
|
||||
var json;
|
||||
json = {
|
||||
'type': this.type,
|
||||
'uid': this.getUid(),
|
||||
'beginning': this.beginning.getUid(),
|
||||
'end': this.end.getUid()
|
||||
};
|
||||
return json;
|
||||
};
|
||||
|
||||
return ReplaceManager;
|
||||
|
||||
})(types.ListManager);
|
||||
types.Replaceable = (function(_super) {
|
||||
__extends(Replaceable, _super);
|
||||
|
||||
function Replaceable(content, parent, uid, prev, next, origin, is_deleted) {
|
||||
if ((content != null) && (content.creator != null)) {
|
||||
this.saveOperation('content', content);
|
||||
this.saveOperation('parent', parent);
|
||||
if (!((prev != null) && (next != null) && (content != null))) {
|
||||
throw new Error("You must define content, prev, and next for Replaceable-types!");
|
||||
}
|
||||
Replaceable.__super__.constructor.call(this, uid, prev, next, origin);
|
||||
} else {
|
||||
this.content = content;
|
||||
}
|
||||
this.saveOperation('parent', parent);
|
||||
Replaceable.__super__.constructor.call(this, uid, prev, next, origin);
|
||||
this.is_deleted = is_deleted;
|
||||
}
|
||||
|
||||
Replaceable.prototype.val = function() {
|
||||
return this.content;
|
||||
};
|
||||
Replaceable.prototype.type = "Replaceable";
|
||||
|
||||
Replaceable.prototype.replace = function(content) {
|
||||
return this.parent.replace(content);
|
||||
};
|
||||
|
||||
Replaceable.prototype.execute = function() {
|
||||
var _base;
|
||||
if (!this.validateSavedOperations()) {
|
||||
return false;
|
||||
} else {
|
||||
if (typeof (_base = this.content).setReplaceManager === "function") {
|
||||
_base.setReplaceManager(this.parent);
|
||||
}
|
||||
return Replaceable.__super__.execute.apply(this, arguments);
|
||||
}
|
||||
};
|
||||
|
||||
Replaceable.prototype._encode = function() {
|
||||
var json;
|
||||
json = {
|
||||
'type': "Replaceable",
|
||||
'content': this.content.getUid(),
|
||||
'ReplaceManager': this.parent.getUid(),
|
||||
'prev': this.prev_cl.getUid(),
|
||||
'next': this.next_cl.getUid(),
|
||||
'uid': this.getUid()
|
||||
};
|
||||
if ((this.origin != null) && this.origin !== this.prev_cl) {
|
||||
json["origin"] = this.origin.getUid();
|
||||
}
|
||||
return json;
|
||||
};
|
||||
|
||||
return Replaceable;
|
||||
|
||||
})(types.Insert);
|
||||
parser["Replaceable"] = function(json) {
|
||||
var content, next, origin, parent, prev, uid;
|
||||
content = json['content'], parent = json['ReplaceManager'], uid = json['uid'], prev = json['prev'], next = json['next'], origin = json['origin'];
|
||||
return new Replaceable(content, parent, uid, prev, next, origin);
|
||||
Replaceable.prototype.val = function() {
|
||||
return this.content;
|
||||
};
|
||||
types['ListManager'] = ListManager;
|
||||
types['MapManager'] = MapManager;
|
||||
types['ReplaceManager'] = ReplaceManager;
|
||||
types['Replaceable'] = Replaceable;
|
||||
return basic_types;
|
||||
|
||||
Replaceable.prototype.applyDelete = function() {
|
||||
var res, _base, _base1, _base2;
|
||||
res = Replaceable.__super__.applyDelete.apply(this, arguments);
|
||||
if (this.content != null) {
|
||||
if (this.next_cl.type !== "Delimiter") {
|
||||
if (typeof (_base = this.content).deleteAllObservers === "function") {
|
||||
_base.deleteAllObservers();
|
||||
}
|
||||
}
|
||||
if (typeof (_base1 = this.content).applyDelete === "function") {
|
||||
_base1.applyDelete();
|
||||
}
|
||||
if (typeof (_base2 = this.content).dontSync === "function") {
|
||||
_base2.dontSync();
|
||||
}
|
||||
}
|
||||
this.content = null;
|
||||
return res;
|
||||
};
|
||||
|
||||
Replaceable.prototype.cleanup = function() {
|
||||
return Replaceable.__super__.cleanup.apply(this, arguments);
|
||||
};
|
||||
|
||||
Replaceable.prototype.callOperationSpecificInsertEvents = function() {
|
||||
var old_value;
|
||||
if (this.next_cl.type === "Delimiter" && this.prev_cl.type !== "Delimiter") {
|
||||
if (!this.is_deleted) {
|
||||
old_value = this.prev_cl.content;
|
||||
this.parent.callEventDecorator([
|
||||
{
|
||||
type: "update",
|
||||
changedBy: this.uid.creator,
|
||||
oldValue: old_value
|
||||
}
|
||||
]);
|
||||
}
|
||||
this.prev_cl.applyDelete();
|
||||
} else if (this.next_cl.type !== "Delimiter") {
|
||||
this.applyDelete();
|
||||
} else {
|
||||
this.parent.callEventDecorator([
|
||||
{
|
||||
type: "add",
|
||||
changedBy: this.uid.creator
|
||||
}
|
||||
]);
|
||||
}
|
||||
return void 0;
|
||||
};
|
||||
|
||||
Replaceable.prototype.callOperationSpecificDeleteEvents = function(o) {
|
||||
if (this.next_cl.type === "Delimiter") {
|
||||
return this.parent.callEventDecorator([
|
||||
{
|
||||
type: "delete",
|
||||
changedBy: o.uid.creator,
|
||||
oldValue: this.content
|
||||
}
|
||||
]);
|
||||
}
|
||||
};
|
||||
|
||||
Replaceable.prototype._encode = function() {
|
||||
var json;
|
||||
json = {
|
||||
'type': this.type,
|
||||
'parent': this.parent.getUid(),
|
||||
'prev': this.prev_cl.getUid(),
|
||||
'next': this.next_cl.getUid(),
|
||||
'origin': this.origin.getUid(),
|
||||
'uid': this.getUid(),
|
||||
'is_deleted': this.is_deleted
|
||||
};
|
||||
if (this.content instanceof types.Operation) {
|
||||
json['content'] = this.content.getUid();
|
||||
} else {
|
||||
if ((this.content != null) && (this.content.creator != null)) {
|
||||
throw new Error("You must not set creator here!");
|
||||
}
|
||||
json['content'] = this.content;
|
||||
}
|
||||
return json;
|
||||
};
|
||||
|
||||
return Replaceable;
|
||||
|
||||
})(types.Insert);
|
||||
types.Replaceable.parse = function(json) {
|
||||
var content, is_deleted, next, origin, parent, prev, uid;
|
||||
content = json['content'], parent = json['parent'], uid = json['uid'], prev = json['prev'], next = json['next'], origin = json['origin'], is_deleted = json['is_deleted'];
|
||||
return new this(content, parent, uid, prev, next, origin, is_deleted);
|
||||
};
|
||||
|
||||
}).call(this);
|
||||
|
||||
//# sourceMappingURL=../Types/StructuredTypes.js.map
|
||||
return basic_types;
|
||||
};
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,303 +1,558 @@
|
||||
(function() {
|
||||
var structured_types_uninitialized,
|
||||
__hasProp = {}.hasOwnProperty,
|
||||
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
|
||||
var structured_types_uninitialized,
|
||||
__hasProp = {}.hasOwnProperty,
|
||||
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
|
||||
|
||||
structured_types_uninitialized = require("./StructuredTypes");
|
||||
structured_types_uninitialized = require("./StructuredTypes");
|
||||
|
||||
module.exports = function(HB) {
|
||||
var TextDelete, TextInsert, WordType, parser, structured_types, types;
|
||||
structured_types = structured_types_uninitialized(HB);
|
||||
types = structured_types.types;
|
||||
parser = structured_types.parser;
|
||||
TextDelete = (function(_super) {
|
||||
__extends(TextDelete, _super);
|
||||
module.exports = function(HB) {
|
||||
var parser, structured_types, types;
|
||||
structured_types = structured_types_uninitialized(HB);
|
||||
types = structured_types.types;
|
||||
parser = structured_types.parser;
|
||||
types.TextInsert = (function(_super) {
|
||||
__extends(TextInsert, _super);
|
||||
|
||||
function TextDelete() {
|
||||
return TextDelete.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
return TextDelete;
|
||||
|
||||
})(types.Delete);
|
||||
parser["TextDelete"] = parser["Delete"];
|
||||
TextInsert = (function(_super) {
|
||||
__extends(TextInsert, _super);
|
||||
|
||||
function TextInsert(content, uid, prev, next, origin) {
|
||||
function TextInsert(content, uid, prev, next, origin, parent) {
|
||||
if (content != null ? content.creator : void 0) {
|
||||
this.saveOperation('content', content);
|
||||
} else {
|
||||
this.content = content;
|
||||
if (!((prev != null) && (next != null))) {
|
||||
throw new Error("You must define prev, and next for TextInsert-types!");
|
||||
}
|
||||
TextInsert.__super__.constructor.call(this, uid, prev, next, origin);
|
||||
}
|
||||
TextInsert.__super__.constructor.call(this, uid, prev, next, origin, parent);
|
||||
}
|
||||
|
||||
TextInsert.prototype.getLength = function() {
|
||||
if (this.isDeleted()) {
|
||||
return 0;
|
||||
} else {
|
||||
return this.content.length;
|
||||
}
|
||||
};
|
||||
TextInsert.prototype.type = "TextInsert";
|
||||
|
||||
TextInsert.prototype.val = function(current_position) {
|
||||
if (this.isDeleted()) {
|
||||
return "";
|
||||
} else {
|
||||
return this.content;
|
||||
}
|
||||
};
|
||||
|
||||
TextInsert.prototype._encode = function() {
|
||||
var json;
|
||||
json = {
|
||||
'type': "TextInsert",
|
||||
'content': this.content,
|
||||
'uid': this.getUid(),
|
||||
'prev': this.prev_cl.getUid(),
|
||||
'next': this.next_cl.getUid()
|
||||
};
|
||||
if ((this.origin != null) && this.origin !== this.prev_cl) {
|
||||
json["origin"] = this.origin.getUid();
|
||||
}
|
||||
return json;
|
||||
};
|
||||
|
||||
return TextInsert;
|
||||
|
||||
})(types.Insert);
|
||||
parser["TextInsert"] = function(json) {
|
||||
var content, next, origin, prev, uid;
|
||||
content = json['content'], uid = json['uid'], prev = json['prev'], next = json['next'], origin = json['origin'];
|
||||
return new TextInsert(content, uid, prev, next, origin);
|
||||
TextInsert.prototype.getLength = function() {
|
||||
if (this.isDeleted()) {
|
||||
return 0;
|
||||
} else {
|
||||
return this.content.length;
|
||||
}
|
||||
};
|
||||
WordType = (function(_super) {
|
||||
__extends(WordType, _super);
|
||||
|
||||
function WordType(uid, beginning, end, prev, next, origin) {
|
||||
WordType.__super__.constructor.call(this, uid, beginning, end, prev, next, origin);
|
||||
TextInsert.prototype.applyDelete = function() {
|
||||
TextInsert.__super__.applyDelete.apply(this, arguments);
|
||||
if (this.content instanceof types.Operation) {
|
||||
this.content.applyDelete();
|
||||
}
|
||||
return this.content = null;
|
||||
};
|
||||
|
||||
WordType.prototype.type = "WordType";
|
||||
TextInsert.prototype.execute = function() {
|
||||
if (!this.validateSavedOperations()) {
|
||||
return false;
|
||||
} else {
|
||||
if (this.content instanceof types.Operation) {
|
||||
this.content.insert_parent = this;
|
||||
}
|
||||
return TextInsert.__super__.execute.call(this);
|
||||
}
|
||||
};
|
||||
|
||||
WordType.prototype.insertText = function(position, content) {
|
||||
var c, o, op, _i, _len;
|
||||
o = this.getOperationByPosition(position);
|
||||
TextInsert.prototype.val = function(current_position) {
|
||||
if (this.isDeleted() || (this.content == null)) {
|
||||
return "";
|
||||
} else {
|
||||
return this.content;
|
||||
}
|
||||
};
|
||||
|
||||
TextInsert.prototype._encode = function() {
|
||||
var json, _ref;
|
||||
json = {
|
||||
'type': this.type,
|
||||
'uid': this.getUid(),
|
||||
'prev': this.prev_cl.getUid(),
|
||||
'next': this.next_cl.getUid(),
|
||||
'origin': this.origin.getUid(),
|
||||
'parent': this.parent.getUid()
|
||||
};
|
||||
if (((_ref = this.content) != null ? _ref.getUid : void 0) != null) {
|
||||
json['content'] = this.content.getUid();
|
||||
} else {
|
||||
json['content'] = this.content;
|
||||
}
|
||||
return json;
|
||||
};
|
||||
|
||||
return TextInsert;
|
||||
|
||||
})(types.Insert);
|
||||
types.TextInsert.parse = function(json) {
|
||||
var content, next, origin, parent, prev, uid;
|
||||
content = json['content'], uid = json['uid'], prev = json['prev'], next = json['next'], origin = json['origin'], parent = json['parent'];
|
||||
return new types.TextInsert(content, uid, prev, next, origin, parent);
|
||||
};
|
||||
types.Array = (function(_super) {
|
||||
__extends(Array, _super);
|
||||
|
||||
function Array() {
|
||||
return Array.__super__.constructor.apply(this, arguments);
|
||||
}
|
||||
|
||||
Array.prototype.type = "Array";
|
||||
|
||||
Array.prototype.applyDelete = function() {
|
||||
var o;
|
||||
o = this.end;
|
||||
while (o != null) {
|
||||
o.applyDelete();
|
||||
o = o.prev_cl;
|
||||
}
|
||||
return Array.__super__.applyDelete.call(this);
|
||||
};
|
||||
|
||||
Array.prototype.cleanup = function() {
|
||||
return Array.__super__.cleanup.call(this);
|
||||
};
|
||||
|
||||
Array.prototype.toJson = function(transform_to_value) {
|
||||
var i, o, val, _i, _len, _results;
|
||||
if (transform_to_value == null) {
|
||||
transform_to_value = false;
|
||||
}
|
||||
val = this.val();
|
||||
_results = [];
|
||||
for (o = _i = 0, _len = val.length; _i < _len; o = ++_i) {
|
||||
i = val[o];
|
||||
if (o instanceof types.Object) {
|
||||
_results.push(o.toJson(transform_to_value));
|
||||
} else if (o instanceof types.Array) {
|
||||
_results.push(o.toJson(transform_to_value));
|
||||
} else if (transform_to_value && o instanceof types.Operation) {
|
||||
_results.push(o.val());
|
||||
} else {
|
||||
_results.push(o);
|
||||
}
|
||||
}
|
||||
return _results;
|
||||
};
|
||||
|
||||
Array.prototype.val = function(pos) {
|
||||
var o, result;
|
||||
if (pos != null) {
|
||||
o = this.getOperationByPosition(pos + 1);
|
||||
if (!(o instanceof types.Delimiter)) {
|
||||
return o.val();
|
||||
} else {
|
||||
throw new Error("this position does not exist");
|
||||
}
|
||||
} else {
|
||||
o = this.beginning.next_cl;
|
||||
result = [];
|
||||
while (o !== this.end) {
|
||||
if (!o.isDeleted()) {
|
||||
result.push(o.val());
|
||||
}
|
||||
o = o.next_cl;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
};
|
||||
|
||||
Array.prototype.push = function(content) {
|
||||
return this.insertAfter(this.end.prev_cl, content);
|
||||
};
|
||||
|
||||
Array.prototype.insertAfter = function(left, content, options) {
|
||||
var c, createContent, right, tmp, _i, _len;
|
||||
createContent = function(content, options) {
|
||||
var type;
|
||||
if ((content != null) && (content.constructor != null)) {
|
||||
type = types[content.constructor.name];
|
||||
if ((type != null) && (type.create != null)) {
|
||||
return type.create(content, options);
|
||||
} else {
|
||||
throw new Error("The " + content.constructor.name + "-type is not (yet) supported in Y.");
|
||||
}
|
||||
} else {
|
||||
return content;
|
||||
}
|
||||
};
|
||||
right = left.next_cl;
|
||||
while (right.isDeleted()) {
|
||||
right = right.next_cl;
|
||||
}
|
||||
left = right.prev_cl;
|
||||
if (content instanceof types.Operation) {
|
||||
(new types.TextInsert(content, void 0, left, right)).execute();
|
||||
} else {
|
||||
for (_i = 0, _len = content.length; _i < _len; _i++) {
|
||||
c = content[_i];
|
||||
op = new TextInsert(c, void 0, o.prev_cl, o);
|
||||
HB.addOperation(op).execute();
|
||||
tmp = (new types.TextInsert(createContent(c, options), void 0, left, right)).execute();
|
||||
left = tmp;
|
||||
}
|
||||
return this;
|
||||
};
|
||||
}
|
||||
return this;
|
||||
};
|
||||
|
||||
WordType.prototype.deleteText = function(position, length) {
|
||||
var d, delete_ops, i, o, _i;
|
||||
o = this.getOperationByPosition(position);
|
||||
delete_ops = [];
|
||||
for (i = _i = 0; 0 <= length ? _i < length : _i > length; i = 0 <= length ? ++_i : --_i) {
|
||||
if (o instanceof types.Delimiter) {
|
||||
break;
|
||||
}
|
||||
d = HB.addOperation(new TextDelete(void 0, o)).execute();
|
||||
Array.prototype.insert = function(position, content, options) {
|
||||
var ith;
|
||||
ith = this.getOperationByPosition(position);
|
||||
return this.insertAfter(ith, [content], options);
|
||||
};
|
||||
|
||||
Array.prototype["delete"] = function(position, length) {
|
||||
var d, delete_ops, i, o, _i;
|
||||
o = this.getOperationByPosition(position + 1);
|
||||
delete_ops = [];
|
||||
for (i = _i = 0; 0 <= length ? _i < length : _i > length; i = 0 <= length ? ++_i : --_i) {
|
||||
if (o instanceof types.Delimiter) {
|
||||
break;
|
||||
}
|
||||
d = (new types.Delete(void 0, o)).execute();
|
||||
o = o.next_cl;
|
||||
while ((!(o instanceof types.Delimiter)) && o.isDeleted()) {
|
||||
o = o.next_cl;
|
||||
while (!(o instanceof types.Delimiter) && o.isDeleted()) {
|
||||
o = o.next_cl;
|
||||
}
|
||||
delete_ops.push(d._encode());
|
||||
}
|
||||
return this;
|
||||
};
|
||||
delete_ops.push(d._encode());
|
||||
}
|
||||
return this;
|
||||
};
|
||||
|
||||
WordType.prototype.replaceText = function(text) {
|
||||
var word;
|
||||
if (this.replace_manager != null) {
|
||||
word = HB.addOperation(new WordType(void 0)).execute();
|
||||
word.insertText(0, text);
|
||||
this.replace_manager.replace(word);
|
||||
return word;
|
||||
Array.prototype._encode = function() {
|
||||
var json;
|
||||
json = {
|
||||
'type': this.type,
|
||||
'uid': this.getUid()
|
||||
};
|
||||
return json;
|
||||
};
|
||||
|
||||
return Array;
|
||||
|
||||
})(types.ListManager);
|
||||
types.Array.parse = function(json) {
|
||||
var uid;
|
||||
uid = json['uid'];
|
||||
return new this(uid);
|
||||
};
|
||||
types.Array.create = function(content, mutable) {
|
||||
var ith, list;
|
||||
if (mutable === "mutable") {
|
||||
list = new types.Array().execute();
|
||||
ith = list.getOperationByPosition(0);
|
||||
list.insertAfter(ith, content);
|
||||
return list;
|
||||
} else if ((mutable == null) || (mutable === "immutable")) {
|
||||
return content;
|
||||
} else {
|
||||
throw new Error("Specify either \"mutable\" or \"immutable\"!!");
|
||||
}
|
||||
};
|
||||
types.String = (function(_super) {
|
||||
__extends(String, _super);
|
||||
|
||||
function String(uid) {
|
||||
this.textfields = [];
|
||||
String.__super__.constructor.call(this, uid);
|
||||
}
|
||||
|
||||
String.prototype.type = "String";
|
||||
|
||||
String.prototype.val = function() {
|
||||
var c, o;
|
||||
c = (function() {
|
||||
var _i, _len, _ref, _results;
|
||||
_ref = this.toArray();
|
||||
_results = [];
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
o = _ref[_i];
|
||||
if (o.val != null) {
|
||||
_results.push(o.val());
|
||||
} else {
|
||||
_results.push("");
|
||||
}
|
||||
}
|
||||
return _results;
|
||||
}).call(this);
|
||||
return c.join('');
|
||||
};
|
||||
|
||||
String.prototype.toString = function() {
|
||||
return this.val();
|
||||
};
|
||||
|
||||
String.prototype.insert = function(position, content, options) {
|
||||
var ith;
|
||||
ith = this.getOperationByPosition(position);
|
||||
return this.insertAfter(ith, content, options);
|
||||
};
|
||||
|
||||
String.prototype.bind = function(textfield, dom_root) {
|
||||
var createRange, creator_token, t, word, writeContent, writeRange, _i, _len, _ref;
|
||||
if (dom_root == null) {
|
||||
dom_root = window;
|
||||
}
|
||||
if (dom_root.getSelection == null) {
|
||||
dom_root = window;
|
||||
}
|
||||
_ref = this.textfields;
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
t = _ref[_i];
|
||||
if (t === textfield) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
creator_token = false;
|
||||
word = this;
|
||||
textfield.value = this.val();
|
||||
this.textfields.push(textfield);
|
||||
if ((textfield.selectionStart != null) && (textfield.setSelectionRange != null)) {
|
||||
createRange = function(fix) {
|
||||
var left, right;
|
||||
left = textfield.selectionStart;
|
||||
right = textfield.selectionEnd;
|
||||
if (fix != null) {
|
||||
left = fix(left);
|
||||
right = fix(right);
|
||||
}
|
||||
return {
|
||||
left: left,
|
||||
right: right
|
||||
};
|
||||
};
|
||||
writeRange = function(range) {
|
||||
writeContent(word.val());
|
||||
return textfield.setSelectionRange(range.left, range.right);
|
||||
};
|
||||
writeContent = function(content) {
|
||||
return textfield.value = content;
|
||||
};
|
||||
} else {
|
||||
createRange = function(fix) {
|
||||
var clength, left, right, s;
|
||||
s = dom_root.getSelection();
|
||||
clength = textfield.textContent.length;
|
||||
left = Math.min(s.anchorOffset, clength);
|
||||
right = Math.min(s.focusOffset, clength);
|
||||
if (fix != null) {
|
||||
left = fix(left);
|
||||
right = fix(right);
|
||||
}
|
||||
return {
|
||||
left: left,
|
||||
right: right,
|
||||
isReal: true
|
||||
};
|
||||
};
|
||||
writeRange = function(range) {
|
||||
var r, s, textnode;
|
||||
writeContent(word.val());
|
||||
textnode = textfield.childNodes[0];
|
||||
if (range.isReal && (textnode != null)) {
|
||||
if (range.left < 0) {
|
||||
range.left = 0;
|
||||
}
|
||||
range.right = Math.max(range.left, range.right);
|
||||
if (range.right > textnode.length) {
|
||||
range.right = textnode.length;
|
||||
}
|
||||
range.left = Math.min(range.left, range.right);
|
||||
r = document.createRange();
|
||||
r.setStart(textnode, range.left);
|
||||
r.setEnd(textnode, range.right);
|
||||
s = window.getSelection();
|
||||
s.removeAllRanges();
|
||||
return s.addRange(r);
|
||||
}
|
||||
};
|
||||
writeContent = function(content) {
|
||||
var append;
|
||||
append = "";
|
||||
if (content[content.length - 1] === " ") {
|
||||
content = content.slice(0, content.length - 1);
|
||||
append = ' ';
|
||||
}
|
||||
textfield.textContent = content;
|
||||
return textfield.innerHTML += append;
|
||||
};
|
||||
}
|
||||
writeContent(this.val());
|
||||
this.observe(function(events) {
|
||||
var event, fix, o_pos, r, _j, _len1, _results;
|
||||
_results = [];
|
||||
for (_j = 0, _len1 = events.length; _j < _len1; _j++) {
|
||||
event = events[_j];
|
||||
if (!creator_token) {
|
||||
if (event.type === "insert") {
|
||||
o_pos = event.position;
|
||||
fix = function(cursor) {
|
||||
if (cursor <= o_pos) {
|
||||
return cursor;
|
||||
} else {
|
||||
cursor += 1;
|
||||
return cursor;
|
||||
}
|
||||
};
|
||||
r = createRange(fix);
|
||||
_results.push(writeRange(r));
|
||||
} else if (event.type === "delete") {
|
||||
o_pos = event.position;
|
||||
fix = function(cursor) {
|
||||
if (cursor < o_pos) {
|
||||
return cursor;
|
||||
} else {
|
||||
cursor -= 1;
|
||||
return cursor;
|
||||
}
|
||||
};
|
||||
r = createRange(fix);
|
||||
_results.push(writeRange(r));
|
||||
} else {
|
||||
_results.push(void 0);
|
||||
}
|
||||
} else {
|
||||
_results.push(void 0);
|
||||
}
|
||||
}
|
||||
return _results;
|
||||
});
|
||||
textfield.onkeypress = function(event) {
|
||||
var char, diff, pos, r;
|
||||
if (word.is_deleted) {
|
||||
textfield.onkeypress = null;
|
||||
return true;
|
||||
}
|
||||
creator_token = true;
|
||||
char = null;
|
||||
if (event.key != null) {
|
||||
if (event.charCode === 32) {
|
||||
char = " ";
|
||||
} else if (event.keyCode === 13) {
|
||||
char = '\n';
|
||||
} else {
|
||||
char = event.key;
|
||||
}
|
||||
} else {
|
||||
throw new Error("This type is currently not maintained by a ReplaceManager!");
|
||||
char = window.String.fromCharCode(event.keyCode);
|
||||
}
|
||||
if (char.length > 1) {
|
||||
return true;
|
||||
} else if (char.length > 0) {
|
||||
r = createRange();
|
||||
pos = Math.min(r.left, r.right);
|
||||
diff = Math.abs(r.right - r.left);
|
||||
word["delete"](pos, diff);
|
||||
word.insert(pos, char);
|
||||
r.left = pos + char.length;
|
||||
r.right = r.left;
|
||||
writeRange(r);
|
||||
}
|
||||
event.preventDefault();
|
||||
creator_token = false;
|
||||
return false;
|
||||
};
|
||||
|
||||
WordType.prototype.val = function() {
|
||||
var c, o;
|
||||
c = (function() {
|
||||
var _i, _len, _ref, _results;
|
||||
_ref = this.toArray();
|
||||
_results = [];
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
o = _ref[_i];
|
||||
if (o.val != null) {
|
||||
_results.push(o.val());
|
||||
} else {
|
||||
_results.push("");
|
||||
}
|
||||
}
|
||||
return _results;
|
||||
}).call(this);
|
||||
return c.join('');
|
||||
textfield.onpaste = function(event) {
|
||||
if (word.is_deleted) {
|
||||
textfield.onpaste = null;
|
||||
return true;
|
||||
}
|
||||
return event.preventDefault();
|
||||
};
|
||||
|
||||
WordType.prototype.toString = function() {
|
||||
return this.val();
|
||||
textfield.oncut = function(event) {
|
||||
if (word.is_deleted) {
|
||||
textfield.oncut = null;
|
||||
return true;
|
||||
}
|
||||
return event.preventDefault();
|
||||
};
|
||||
|
||||
WordType.prototype.setReplaceManager = function(op) {
|
||||
this.saveOperation('replace_manager', op);
|
||||
this.validateSavedOperations();
|
||||
return this.on(['insert', 'delete'], (function(_this) {
|
||||
return function() {
|
||||
var _ref;
|
||||
return (_ref = _this.replace_manager) != null ? _ref.callEvent('change') : void 0;
|
||||
};
|
||||
})(this));
|
||||
};
|
||||
|
||||
WordType.prototype.bind = function(textfield) {
|
||||
var word;
|
||||
word = this;
|
||||
textfield.value = this.val();
|
||||
this.on("insert", function(event, op) {
|
||||
var fix, left, o_pos, right;
|
||||
o_pos = op.getPosition();
|
||||
fix = function(cursor) {
|
||||
if (cursor <= o_pos) {
|
||||
return cursor;
|
||||
} else {
|
||||
cursor += 1;
|
||||
return cursor;
|
||||
}
|
||||
};
|
||||
left = fix(textfield.selectionStart);
|
||||
right = fix(textfield.selectionEnd);
|
||||
textfield.value = word.val();
|
||||
return textfield.setSelectionRange(left, right);
|
||||
});
|
||||
this.on("delete", function(event, op) {
|
||||
var fix, left, o_pos, right;
|
||||
o_pos = op.getPosition();
|
||||
fix = function(cursor) {
|
||||
if (cursor < o_pos) {
|
||||
return cursor;
|
||||
} else {
|
||||
cursor -= 1;
|
||||
return cursor;
|
||||
}
|
||||
};
|
||||
left = fix(textfield.selectionStart);
|
||||
right = fix(textfield.selectionEnd);
|
||||
textfield.value = word.val();
|
||||
return textfield.setSelectionRange(left, right);
|
||||
});
|
||||
textfield.onkeypress = function(event) {
|
||||
var char, diff, new_pos, pos;
|
||||
char = null;
|
||||
if (event.key != null) {
|
||||
if (event.charCode === 32) {
|
||||
char = " ";
|
||||
} else if (event.keyCode === 13) {
|
||||
char = '\n';
|
||||
} else {
|
||||
char = event.key;
|
||||
}
|
||||
return textfield.onkeydown = function(event) {
|
||||
var del_length, diff, new_pos, pos, r, val;
|
||||
creator_token = true;
|
||||
if (word.is_deleted) {
|
||||
textfield.onkeydown = null;
|
||||
return true;
|
||||
}
|
||||
r = createRange();
|
||||
pos = Math.min(r.left, r.right, word.val().length);
|
||||
diff = Math.abs(r.left - r.right);
|
||||
if ((event.keyCode != null) && event.keyCode === 8) {
|
||||
if (diff > 0) {
|
||||
word["delete"](pos, diff);
|
||||
r.left = pos;
|
||||
r.right = pos;
|
||||
writeRange(r);
|
||||
} else {
|
||||
char = String.fromCharCode(event.keyCode);
|
||||
}
|
||||
if (char.length > 0) {
|
||||
pos = Math.min(textfield.selectionStart, textfield.selectionEnd);
|
||||
diff = Math.abs(textfield.selectionEnd - textfield.selectionStart);
|
||||
word.deleteText(pos, diff);
|
||||
word.insertText(pos, char);
|
||||
new_pos = pos + char.length;
|
||||
textfield.setSelectionRange(new_pos, new_pos);
|
||||
return event.preventDefault();
|
||||
} else {
|
||||
return event.preventDefault();
|
||||
}
|
||||
};
|
||||
textfield.onpaste = function(event) {
|
||||
return event.preventDefault();
|
||||
};
|
||||
textfield.oncut = function(event) {
|
||||
return event.preventDefault();
|
||||
};
|
||||
return textfield.onkeydown = function(event) {
|
||||
var del_length, diff, new_pos, pos, val;
|
||||
pos = Math.min(textfield.selectionStart, textfield.selectionEnd);
|
||||
diff = Math.abs(textfield.selectionEnd - textfield.selectionStart);
|
||||
if ((event.keyCode != null) && event.keyCode === 8) {
|
||||
if (diff > 0) {
|
||||
word.deleteText(pos, diff);
|
||||
textfield.setSelectionRange(pos, pos);
|
||||
if ((event.ctrlKey != null) && event.ctrlKey) {
|
||||
val = word.val();
|
||||
new_pos = pos;
|
||||
del_length = 0;
|
||||
if (pos > 0) {
|
||||
new_pos--;
|
||||
del_length++;
|
||||
}
|
||||
while (new_pos > 0 && val[new_pos] !== " " && val[new_pos] !== '\n') {
|
||||
new_pos--;
|
||||
del_length++;
|
||||
}
|
||||
word["delete"](new_pos, pos - new_pos);
|
||||
r.left = new_pos;
|
||||
r.right = new_pos;
|
||||
writeRange(r);
|
||||
} else {
|
||||
if ((event.ctrlKey != null) && event.ctrlKey) {
|
||||
val = textfield.value;
|
||||
new_pos = pos;
|
||||
del_length = 0;
|
||||
if (pos > 0) {
|
||||
new_pos--;
|
||||
del_length++;
|
||||
}
|
||||
while (new_pos > 0 && val[new_pos] !== " " && val[new_pos] !== '\n') {
|
||||
new_pos--;
|
||||
del_length++;
|
||||
}
|
||||
word.deleteText(new_pos, pos - new_pos);
|
||||
textfield.setSelectionRange(new_pos, new_pos);
|
||||
} else {
|
||||
word.deleteText(pos - 1, 1);
|
||||
if (pos > 0) {
|
||||
word["delete"](pos - 1, 1);
|
||||
r.left = pos - 1;
|
||||
r.right = pos - 1;
|
||||
writeRange(r);
|
||||
}
|
||||
}
|
||||
return event.preventDefault();
|
||||
} else if ((event.keyCode != null) && event.keyCode === 46) {
|
||||
if (diff > 0) {
|
||||
word.deleteText(pos, diff);
|
||||
textfield.setSelectionRange(pos, pos);
|
||||
} else {
|
||||
word.deleteText(pos, 1);
|
||||
textfield.setSelectionRange(pos, pos);
|
||||
}
|
||||
return event.preventDefault();
|
||||
}
|
||||
};
|
||||
event.preventDefault();
|
||||
creator_token = false;
|
||||
return false;
|
||||
} else if ((event.keyCode != null) && event.keyCode === 46) {
|
||||
if (diff > 0) {
|
||||
word["delete"](pos, diff);
|
||||
r.left = pos;
|
||||
r.right = pos;
|
||||
writeRange(r);
|
||||
} else {
|
||||
word["delete"](pos, 1);
|
||||
r.left = pos;
|
||||
r.right = pos;
|
||||
writeRange(r);
|
||||
}
|
||||
event.preventDefault();
|
||||
creator_token = false;
|
||||
return false;
|
||||
} else {
|
||||
creator_token = false;
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
WordType.prototype._encode = function() {
|
||||
var json;
|
||||
json = {
|
||||
'type': "WordType",
|
||||
'uid': this.getUid(),
|
||||
'beginning': this.beginning.getUid(),
|
||||
'end': this.end.getUid()
|
||||
};
|
||||
if (this.prev_cl != null) {
|
||||
json['prev'] = this.prev_cl.getUid();
|
||||
}
|
||||
if (this.next_cl != null) {
|
||||
json['next'] = this.next_cl.getUid();
|
||||
}
|
||||
if ((this.origin != null) && this.origin !== this.prev_cl) {
|
||||
json["origin"] = this.origin.getUid();
|
||||
}
|
||||
return json;
|
||||
};
|
||||
|
||||
return WordType;
|
||||
|
||||
})(types.ListManager);
|
||||
parser['WordType'] = function(json) {
|
||||
var beginning, end, next, origin, prev, uid;
|
||||
uid = json['uid'], beginning = json['beginning'], end = json['end'], prev = json['prev'], next = json['next'], origin = json['origin'];
|
||||
return new WordType(uid, beginning, end, prev, next, origin);
|
||||
};
|
||||
types['TextInsert'] = TextInsert;
|
||||
types['TextDelete'] = TextDelete;
|
||||
types['WordType'] = WordType;
|
||||
return structured_types;
|
||||
|
||||
String.prototype._encode = function() {
|
||||
var json;
|
||||
json = {
|
||||
'type': this.type,
|
||||
'uid': this.getUid()
|
||||
};
|
||||
return json;
|
||||
};
|
||||
|
||||
return String;
|
||||
|
||||
})(types.Array);
|
||||
types.String.parse = function(json) {
|
||||
var uid;
|
||||
uid = json['uid'];
|
||||
return new this(uid);
|
||||
};
|
||||
|
||||
}).call(this);
|
||||
|
||||
//# sourceMappingURL=../Types/TextTypes.js.map
|
||||
types.String.create = function(content, mutable) {
|
||||
var word;
|
||||
if (mutable === "mutable") {
|
||||
word = new types.String().execute();
|
||||
word.insert(0, content);
|
||||
return word;
|
||||
} else if ((mutable == null) || (mutable === "immutable")) {
|
||||
return content;
|
||||
} else {
|
||||
throw new Error("Specify either \"mutable\" or \"immutable\"!!");
|
||||
}
|
||||
};
|
||||
return structured_types;
|
||||
};
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,6 +0,0 @@
|
||||
(function() {
|
||||
|
||||
|
||||
}).call(this);
|
||||
|
||||
//# sourceMappingURL=../Types/XmlTypes.js.map
|
||||
@@ -1 +0,0 @@
|
||||
{"version":3,"sources":["Types/XmlTypes.coffee"],"names":[],"mappings":"AAoGwC;AAAA;AAAA","file":"Types/XmlTypes.js","sourceRoot":"/source/","sourcesContent":[""]}
|
||||
@@ -1,12 +0,0 @@
|
||||
(function() {
|
||||
exports['IwcConnector'] = require('./Connectors/IwcConnector');
|
||||
|
||||
exports['TestConnector'] = require('./Connectors/TestConnector');
|
||||
|
||||
exports['JsonFramework'] = require('./Frameworks/JsonFramework');
|
||||
|
||||
exports['TextFramework'] = require('./Frameworks/TextFramework');
|
||||
|
||||
}).call(this);
|
||||
|
||||
//# sourceMappingURL=index.js.map
|
||||
@@ -1 +0,0 @@
|
||||
{"version":3,"sources":["index.coffee"],"names":[],"mappings":"AAEA;AAAA,EAAA,OAAQ,CAAA,cAAA,CAAR,GACE,OAAA,CAAQ,2BAAR,CADF,CAAA;;AAAA,EAEA,OAAQ,CAAA,eAAA,CAAR,GACE,OAAA,CAAQ,4BAAR,CAHF,CAAA;;AAAA,EAIA,OAAQ,CAAA,eAAA,CAAR,GACE,OAAA,CAAQ,4BAAR,CALF,CAAA;;AAAA,EAMA,OAAQ,CAAA,eAAA,CAAR,GACE,OAAA,CAAQ,4BAAR,CAPF,CAAA;AAAA","file":"index.js","sourceRoot":"/source/","sourcesContent":["\n\nexports['IwcConnector'] =\n require './Connectors/IwcConnector'\nexports['TestConnector'] =\n require './Connectors/TestConnector'\nexports['JsonFramework'] =\n require './Frameworks/JsonFramework'\nexports['TextFramework'] =\n require './Frameworks/TextFramework'\n\n"]}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -6,13 +6,22 @@
|
||||
</head>
|
||||
<body>
|
||||
<div id="mocha"></div>
|
||||
<script src="../../node_modules/mocha/mocha.js"></script>
|
||||
<script>mocha.setup('bdd')</script>
|
||||
<div id="test_dom" test_attribute="the test" class="stuffy" style="color: blue"><p id="replaceme">replace me</p><p id="removeme">remove me</p><p>This is a test object for <b>XmlFramework</b></p><span class="span_element"><p>span</p></span></div>
|
||||
<script src="../../node_modules/mocha/mocha.js" class="awesome"></script>
|
||||
<script>
|
||||
mocha.setup('bdd');
|
||||
mocha.ui('bdd');
|
||||
mocha.reporter('html');
|
||||
</script>
|
||||
<script src="TextYatta_test.js"></script>
|
||||
<script src="JsonYatta_test.js"></script>
|
||||
<!--script src="XmlYatta_test_browser.js"></script-->
|
||||
<script>
|
||||
mocha.checkLeaks();
|
||||
mocha.run();
|
||||
//mocha.checkLeaks();
|
||||
//mocha.run();
|
||||
window.onerror = null;
|
||||
if (window.mochaPhantomJS) { mochaPhantomJS.run(); }
|
||||
else { mocha.run(); }
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,322 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='UTF-8'>
|
||||
<title>Yatta! API</title>
|
||||
<script src='javascript/application.js'></script>
|
||||
<script src='javascript/search.js'></script>
|
||||
<link rel='stylesheet' href='stylesheets/application.css' type='text/css'>
|
||||
</head>
|
||||
<body>
|
||||
<div id='base' data-path=''></div>
|
||||
<div id='header'>
|
||||
<div id='menu'>
|
||||
</div>
|
||||
</div>
|
||||
<div id='content'>
|
||||
<h1 class='noborder title'></h1>
|
||||
<div id='listing'>
|
||||
<h1 class='alphaindex'>Alphabetical Index</h1>
|
||||
<h2>Extra File Listing</h2>
|
||||
<ul id='files'>
|
||||
<li>
|
||||
<a href='extra/README.md.html' title='README.md'>
|
||||
README.md
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href='extra/LICENSE.txt.html' title='LICENSE.txt'>
|
||||
LICENSE.txt
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<h2>Class Listing A-Z</h2>
|
||||
<div class='index'>
|
||||
<ul>
|
||||
<li class='letter'>i</li>
|
||||
<ul>
|
||||
<li>
|
||||
<a href='class/IwcConnector.html'>
|
||||
IwcConnector
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
<ul>
|
||||
<li class='letter'>j</li>
|
||||
<ul>
|
||||
<li>
|
||||
<a href='class/JsonFramework.html'>
|
||||
JsonFramework
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/JsonTypeWrapper.html'>
|
||||
JsonTypeWrapper
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/JsonType.html'>
|
||||
JsonType
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
<ul>
|
||||
<li class='letter'>p</li>
|
||||
<ul>
|
||||
<li>
|
||||
<a href='class/PeerJsConnector.html'>
|
||||
PeerJsConnector
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
<ul>
|
||||
<li class='letter'>t</li>
|
||||
<ul>
|
||||
<li>
|
||||
<a href='class/TextFramework.html'>
|
||||
TextFramework
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
<ul>
|
||||
<li class='letter'>w</li>
|
||||
<ul>
|
||||
<li>
|
||||
<a href='class/WordType.html'>
|
||||
WordType
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
</div>
|
||||
<h2>File Listing A-Z</h2>
|
||||
<div class='index'>
|
||||
<ul>
|
||||
<li class='letter'>b</li>
|
||||
<ul>
|
||||
<li>
|
||||
<a href='file/lib/Types/BasicTypes.coffee.html'>
|
||||
BasicTypes.coffee
|
||||
</a>
|
||||
<small>
|
||||
(lib/Types)
|
||||
</small>
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
<ul>
|
||||
<li class='letter'>e</li>
|
||||
<ul>
|
||||
<li>
|
||||
<a href='file/lib/Engine.coffee.html'>
|
||||
Engine.coffee
|
||||
</a>
|
||||
<small>
|
||||
(lib)
|
||||
</small>
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
<ul>
|
||||
<li class='letter'>h</li>
|
||||
<ul>
|
||||
<li>
|
||||
<a href='file/lib/HistoryBuffer.coffee.html'>
|
||||
HistoryBuffer.coffee
|
||||
</a>
|
||||
<small>
|
||||
(lib)
|
||||
</small>
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
<ul>
|
||||
<li class='letter'>i</li>
|
||||
<ul>
|
||||
<li>
|
||||
<a href='file/lib/Connectors/IwcConnector.coffee.html'>
|
||||
IwcConnector.coffee
|
||||
</a>
|
||||
<small>
|
||||
(lib/Connectors)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='file/lib/index.coffee.html'>
|
||||
index.coffee
|
||||
</a>
|
||||
<small>
|
||||
(lib)
|
||||
</small>
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
<ul>
|
||||
<li class='letter'>j</li>
|
||||
<ul>
|
||||
<li>
|
||||
<a href='file/lib/Frameworks/JsonFramework.coffee.html'>
|
||||
JsonFramework.coffee
|
||||
</a>
|
||||
<small>
|
||||
(lib/Frameworks)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='file/lib/Types/JsonTypes.coffee.html'>
|
||||
JsonTypes.coffee
|
||||
</a>
|
||||
<small>
|
||||
(lib/Types)
|
||||
</small>
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
<ul>
|
||||
<li class='letter'>p</li>
|
||||
<ul>
|
||||
<li>
|
||||
<a href='file/lib/Connectors/PeerJsConnector.coffee.html'>
|
||||
PeerJsConnector.coffee
|
||||
</a>
|
||||
<small>
|
||||
(lib/Connectors)
|
||||
</small>
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
<ul>
|
||||
<li class='letter'>s</li>
|
||||
<ul>
|
||||
<li>
|
||||
<a href='file/lib/Types/StructuredTypes.coffee.html'>
|
||||
StructuredTypes.coffee
|
||||
</a>
|
||||
<small>
|
||||
(lib/Types)
|
||||
</small>
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
<ul>
|
||||
<li class='letter'>t</li>
|
||||
<ul>
|
||||
<li>
|
||||
<a href='file/lib/Connectors/TestConnector.coffee.html'>
|
||||
TestConnector.coffee
|
||||
</a>
|
||||
<small>
|
||||
(lib/Connectors)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='file/lib/Frameworks/TextFramework.coffee.html'>
|
||||
TextFramework.coffee
|
||||
</a>
|
||||
<small>
|
||||
(lib/Frameworks)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='file/lib/Types/TextTypes.coffee.html'>
|
||||
TextTypes.coffee
|
||||
</a>
|
||||
<small>
|
||||
(lib/Types)
|
||||
</small>
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
<ul>
|
||||
<li class='letter'>x</li>
|
||||
<ul>
|
||||
<li>
|
||||
<a href='file/lib/Types/XmlTypes.coffee.html'>
|
||||
XmlTypes.coffee
|
||||
</a>
|
||||
<small>
|
||||
(lib/Types)
|
||||
</small>
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
August 24, 14 01:51:08 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
2.0.9
|
||||
✲
|
||||
Press H to see the keyboard shortcuts
|
||||
✲
|
||||
<a href='http://twitter.com/netzpirat' target='_parent'>@netzpirat</a>
|
||||
✲
|
||||
<a href='http://twitter.com/_inossidabile' target='_parent'>@_inossidabile</a>
|
||||
</div>
|
||||
<iframe id='search_frame'></iframe>
|
||||
<div id='fuzzySearch'>
|
||||
<input type='text'>
|
||||
<ol></ol>
|
||||
</div>
|
||||
<div id='help'>
|
||||
<p>
|
||||
Quickly fuzzy find classes, mixins, methods, file:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>T</span>
|
||||
Open fuzzy finder dialog
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
Control the navigation frame:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>L</span>
|
||||
Toggle list view
|
||||
</li>
|
||||
<li>
|
||||
<span>C</span>
|
||||
Show class list
|
||||
</li>
|
||||
<li>
|
||||
<span>I</span>
|
||||
Show mixin list
|
||||
</li>
|
||||
<li>
|
||||
<span>F</span>
|
||||
Show file list
|
||||
</li>
|
||||
<li>
|
||||
<span>M</span>
|
||||
Show method list
|
||||
</li>
|
||||
<li>
|
||||
<span>E</span>
|
||||
Show extras list
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
You can focus and blur the search input:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>S</span>
|
||||
Focus search input
|
||||
</li>
|
||||
<li>
|
||||
<span>Esc</span>
|
||||
Blur search input
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,376 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='UTF-8'>
|
||||
<title>Yatta! API</title>
|
||||
<script src='../javascript/application.js'></script>
|
||||
<script src='../javascript/search.js'></script>
|
||||
<link rel='stylesheet' href='../stylesheets/application.css' type='text/css'>
|
||||
</head>
|
||||
<body>
|
||||
<div id='base' data-path='../'></div>
|
||||
<div id='header'>
|
||||
<div id='menu'>
|
||||
<a href='../extra/README.md.html' title='Yatta!'>
|
||||
Yatta!
|
||||
</a>
|
||||
»
|
||||
<a href='../alphabetical_index.html' title='Index'>
|
||||
Index
|
||||
</a>
|
||||
»
|
||||
<span class='title'>IwcConnector</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id='content'>
|
||||
<h1>
|
||||
Class:
|
||||
IwcConnector
|
||||
</h1>
|
||||
<table class='box'>
|
||||
<tr>
|
||||
<td>Defined in:</td>
|
||||
<td>lib/Connectors/IwcConnector.coffee</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2>Overview</h2>
|
||||
<div class='docstring'>
|
||||
<p>The Iwc Connector adds support for the Inter-Widget-Communication protocol that is used in the Role-SDK.</p><p>You must not use your own IWC client when using this connector!!</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
<h3>See also:</h3>
|
||||
<ul class='see'>
|
||||
<li>
|
||||
<a href='http://dbis.rwth-aachen.de/cms/projects/the-xmpp-experience#interwidget-communication'>http://dbis.rwth-aachen.de/cms/projects/the-xmpp-experience#interwidget-communication</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href='http://dbis.rwth-aachen.de/cms/projects/ROLE'>http://dbis.rwth-aachen.de/cms/projects/ROLE</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<h2>Instance Method Summary</h2>
|
||||
<ul class='summary'>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#setIwcHandler-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>setIwcHandler</b><span>(f)</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
Set your own IWC handler.
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#sendIwcIntent-dynamic'>
|
||||
~
|
||||
(void)
|
||||
<b>sendIwcIntent intent</b><span>()</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
Helper for sending iwc intents.
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#send-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>send</b><span>(o)</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='note private title'>Private</span>
|
||||
<span class='desc'>
|
||||
This function is called whenever an operation was executed.
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#receive-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>receive</b><span>(o)</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='note private title'>Private</span>
|
||||
<span class='desc'>
|
||||
This function is called whenever an operation was received from another peer.
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
<h2>Constructor Details</h2>
|
||||
<div class='methods'>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='constructor-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>constructor</b><span>(engine, HB, execution_listener, yatta)</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='tags'>
|
||||
<h3>Parameters:</h3>
|
||||
<ul class='param'>
|
||||
<li>
|
||||
<span class='name'>engine</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>Engine</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>The transformation engine </span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='name'>HB</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>HistoryBuffer</tt>
|
||||
)
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='name'>execution_listener</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>Array<Function></tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>You must ensure that whenever an operation is executed, every function in this Array is called. </span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='name'>yatta</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>YattaFramework</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>The Yatta framework. </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h2>Instance Method Details</h2>
|
||||
<div class='methods'>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='setIwcHandler-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>setIwcHandler</b><span>(f)</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>Set your own IWC handler. It will be called after Yatta consumed the
|
||||
data from the received intent.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='sendIwcIntent-dynamic'>
|
||||
~
|
||||
(void)
|
||||
<b>sendIwcIntent intent</b><span>()</span>
|
||||
<br>
|
||||
~
|
||||
(void)
|
||||
<b>sendIwcIntent action_name, content</b><span>()</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>Helper for sending iwc intents.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
<div class='overloads'>
|
||||
<h3>Overloads:</h3>
|
||||
<div class='overload'>
|
||||
<p class='signature'>
|
||||
~
|
||||
(void)
|
||||
<b>sendIwcIntent intent</b><span>()</span>
|
||||
</p>
|
||||
<div class='tags'>
|
||||
<h3>Parameters:</h3>
|
||||
<ul class='param'>
|
||||
<li>
|
||||
<span class='name'>intent</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>Object</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>The intent object. </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='overload'>
|
||||
<p class='signature'>
|
||||
~
|
||||
(void)
|
||||
<b>sendIwcIntent action_name, content</b><span>()</span>
|
||||
</p>
|
||||
<div class='tags'>
|
||||
<h3>Parameters:</h3>
|
||||
<ul class='param'>
|
||||
<li>
|
||||
<span class='name'>action_name</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>String</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>The name of the action that is going to be send. </span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='name'>content</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>String</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>The content that is atteched to the intent. </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='send-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>send</b><span>(o)</span>
|
||||
<span class='note private'>Private</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>This function is called whenever an operation was executed.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
<h3>Parameters:</h3>
|
||||
<ul class='param'>
|
||||
<li>
|
||||
<span class='name'>o</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>Operation</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>The operation that was executed. </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='receive-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>receive</b><span>(o)</span>
|
||||
<span class='note private'>Private</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>This function is called whenever an operation was received from another peer.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
<h3>Parameters:</h3>
|
||||
<ul class='param'>
|
||||
<li>
|
||||
<span class='name'>o</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>Operation</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>The operation that was received. </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
August 24, 14 01:51:08 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
2.0.9
|
||||
✲
|
||||
Press H to see the keyboard shortcuts
|
||||
✲
|
||||
<a href='http://twitter.com/netzpirat' target='_parent'>@netzpirat</a>
|
||||
✲
|
||||
<a href='http://twitter.com/_inossidabile' target='_parent'>@_inossidabile</a>
|
||||
</div>
|
||||
<iframe id='search_frame'></iframe>
|
||||
<div id='fuzzySearch'>
|
||||
<input type='text'>
|
||||
<ol></ol>
|
||||
</div>
|
||||
<div id='help'>
|
||||
<p>
|
||||
Quickly fuzzy find classes, mixins, methods, file:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>T</span>
|
||||
Open fuzzy finder dialog
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
Control the navigation frame:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>L</span>
|
||||
Toggle list view
|
||||
</li>
|
||||
<li>
|
||||
<span>C</span>
|
||||
Show class list
|
||||
</li>
|
||||
<li>
|
||||
<span>I</span>
|
||||
Show mixin list
|
||||
</li>
|
||||
<li>
|
||||
<span>F</span>
|
||||
Show file list
|
||||
</li>
|
||||
<li>
|
||||
<span>M</span>
|
||||
Show method list
|
||||
</li>
|
||||
<li>
|
||||
<span>E</span>
|
||||
Show extras list
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
You can focus and blur the search input:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>S</span>
|
||||
Focus search input
|
||||
</li>
|
||||
<li>
|
||||
<span>Esc</span>
|
||||
Blur search input
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,409 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='UTF-8'>
|
||||
<title>Yatta! API</title>
|
||||
<script src='../javascript/application.js'></script>
|
||||
<script src='../javascript/search.js'></script>
|
||||
<link rel='stylesheet' href='../stylesheets/application.css' type='text/css'>
|
||||
</head>
|
||||
<body>
|
||||
<div id='base' data-path='../'></div>
|
||||
<div id='header'>
|
||||
<div id='menu'>
|
||||
<a href='../extra/README.md.html' title='Yatta!'>
|
||||
Yatta!
|
||||
</a>
|
||||
»
|
||||
<a href='../alphabetical_index.html' title='Index'>
|
||||
Index
|
||||
</a>
|
||||
»
|
||||
<span class='title'>JsonFramework</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id='content'>
|
||||
<h1>
|
||||
Class:
|
||||
JsonFramework
|
||||
</h1>
|
||||
<table class='box'>
|
||||
<tr>
|
||||
<td>Defined in:</td>
|
||||
<td>lib/Frameworks/JsonFramework.coffee</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2>Overview</h2>
|
||||
<div class='docstring'>
|
||||
<p>Framework for Json data-structures.
|
||||
Known values that are supported:</p><ul>
|
||||
<li>String</li>
|
||||
<li>Integer</li>
|
||||
<li>Array</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<div class='tags'>
|
||||
</div>
|
||||
<h2>Instance Method Summary</h2>
|
||||
<ul class='summary'>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#getSharedObject-dynamic'>
|
||||
#
|
||||
(?)
|
||||
<b>getSharedObject</b><span>()</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#getConnector-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>getConnector</b><span>()</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
Get the initialized connector.
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#getHistoryBuffer-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>getHistoryBuffer</b><span>()</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#setMutableDefault-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>setMutableDefault</b><span>(mutable)</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#getUserId-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>getUserId</b><span>()</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
Get the UserId from the HistoryBuffer object.
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#toJson-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>toJson</b><span>()</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#val-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>val</b><span>(name, content, mutable)</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#on-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>on</b><span>()</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#deleteListener-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>deleteListener</b><span>()</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
<h2>Constructor Details</h2>
|
||||
<div class='methods'>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='constructor-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>constructor</b><span>(user_id, Connector)</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='tags'>
|
||||
<h3>Parameters:</h3>
|
||||
<ul class='param'>
|
||||
<li>
|
||||
<span class='name'>user_id</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>String</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>Unique id of the peer. </span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='name'>Connector</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>Connector</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>the connector class. </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h2>Instance Method Details</h2>
|
||||
<div class='methods'>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='getSharedObject-dynamic'>
|
||||
#
|
||||
(?)
|
||||
<b>getSharedObject</b><span>()</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='tags'>
|
||||
<h3>Returns:</h3>
|
||||
<ul class='return'>
|
||||
<li>
|
||||
<span class='type'></span>
|
||||
(
|
||||
<tt>?</tt>
|
||||
)
|
||||
—
|
||||
<span class='desc'>JsonType </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='getConnector-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>getConnector</b><span>()</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>Get the initialized connector.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='getHistoryBuffer-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>getHistoryBuffer</b><span>()</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='tags'>
|
||||
<h3>See also:</h3>
|
||||
<ul class='see'>
|
||||
<li>
|
||||
<a href='HistoryBuffer'>HistoryBuffer</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='setMutableDefault-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>setMutableDefault</b><span>(mutable)</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='tags'>
|
||||
<h3>See also:</h3>
|
||||
<ul class='see'>
|
||||
<li>
|
||||
<a href='JsonType.setMutableDefault'>JsonType.setMutableDefault</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='getUserId-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>getUserId</b><span>()</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>Get the UserId from the HistoryBuffer object.
|
||||
In most cases this will be the same as the user_id value with which
|
||||
JsonFramework was initialized (Depending on the HistoryBuffer implementation).</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='toJson-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>toJson</b><span>()</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='tags'>
|
||||
<h3>See also:</h3>
|
||||
<ul class='see'>
|
||||
<li>
|
||||
<a href='JsonType.toJson'>JsonType.toJson</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='val-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>val</b><span>(name, content, mutable)</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='tags'>
|
||||
<h3>See also:</h3>
|
||||
<ul class='see'>
|
||||
<li>
|
||||
<a href='JsonType.val'>JsonType.val</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='on-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>on</b><span>()</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='tags'>
|
||||
<h3>See also:</h3>
|
||||
<ul class='see'>
|
||||
<li>
|
||||
<a href='Operation.on'>Operation.on</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='deleteListener-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>deleteListener</b><span>()</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='tags'>
|
||||
<h3>See also:</h3>
|
||||
<ul class='see'>
|
||||
<li>
|
||||
<a href='Operation.deleteListener'>Operation.deleteListener</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
August 24, 14 01:51:08 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
2.0.9
|
||||
✲
|
||||
Press H to see the keyboard shortcuts
|
||||
✲
|
||||
<a href='http://twitter.com/netzpirat' target='_parent'>@netzpirat</a>
|
||||
✲
|
||||
<a href='http://twitter.com/_inossidabile' target='_parent'>@_inossidabile</a>
|
||||
</div>
|
||||
<iframe id='search_frame'></iframe>
|
||||
<div id='fuzzySearch'>
|
||||
<input type='text'>
|
||||
<ol></ol>
|
||||
</div>
|
||||
<div id='help'>
|
||||
<p>
|
||||
Quickly fuzzy find classes, mixins, methods, file:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>T</span>
|
||||
Open fuzzy finder dialog
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
Control the navigation frame:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>L</span>
|
||||
Toggle list view
|
||||
</li>
|
||||
<li>
|
||||
<span>C</span>
|
||||
Show class list
|
||||
</li>
|
||||
<li>
|
||||
<span>I</span>
|
||||
Show mixin list
|
||||
</li>
|
||||
<li>
|
||||
<span>F</span>
|
||||
Show file list
|
||||
</li>
|
||||
<li>
|
||||
<span>M</span>
|
||||
Show method list
|
||||
</li>
|
||||
<li>
|
||||
<span>E</span>
|
||||
Show extras list
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
You can focus and blur the search input:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>S</span>
|
||||
Focus search input
|
||||
</li>
|
||||
<li>
|
||||
<span>Esc</span>
|
||||
Blur search input
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,500 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='UTF-8'>
|
||||
<title>Yatta! API</title>
|
||||
<script src='../javascript/application.js'></script>
|
||||
<script src='../javascript/search.js'></script>
|
||||
<link rel='stylesheet' href='../stylesheets/application.css' type='text/css'>
|
||||
</head>
|
||||
<body>
|
||||
<div id='base' data-path='../'></div>
|
||||
<div id='header'>
|
||||
<div id='menu'>
|
||||
<a href='../extra/README.md.html' title='Yatta!'>
|
||||
Yatta!
|
||||
</a>
|
||||
»
|
||||
<a href='../alphabetical_index.html' title='Index'>
|
||||
Index
|
||||
</a>
|
||||
»
|
||||
<span class='title'>JsonType</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id='content'>
|
||||
<h1>
|
||||
Class:
|
||||
JsonType
|
||||
</h1>
|
||||
<table class='box'>
|
||||
<tr>
|
||||
<td>Defined in:</td>
|
||||
<td>lib/Types/JsonTypes.coffee</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Inherits:</td>
|
||||
<td>
|
||||
types.MapManager
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2>Overview</h2>
|
||||
<div class='docstring'>
|
||||
<p>Manages Object-like values.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
</div>
|
||||
<h2>Variables Summary</h2>
|
||||
<dl class='constants'>
|
||||
<dt id='type-variable'>
|
||||
type
|
||||
=
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code class='coffeescript'>"JsonType"</code></pre>
|
||||
<div class='docstring'>
|
||||
<p>Identifies this class.
|
||||
Use it to check whether this is a json-type or something else.</p>
|
||||
<div class='examples'>
|
||||
<h3>Examples:</h3>
|
||||
<h4>
|
||||
|
||||
</h4>
|
||||
<pre><code class='coffeescript'>var x = yatta.val('unknown')
|
||||
if (x.type === "JsonType") {
|
||||
console.log JSON.stringify(x.toJson())
|
||||
}</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
</div>
|
||||
</dd>
|
||||
<dt id='mutable_default-variable'>
|
||||
mutable_default
|
||||
=
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code class='coffeescript'>true</code></pre>
|
||||
<div class='docstring'>
|
||||
<p>Whether the default is 'mutable' (true) or 'immutable' (false)</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<h2>Instance Method Summary</h2>
|
||||
<ul class='summary'>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#toJson-dynamic'>
|
||||
#
|
||||
(Json)
|
||||
<b>toJson</b><span>()</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
Transform this to a Json and loose all the sharing-abilities (the new object will be a deep clone)!
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#setReplaceManager-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>setReplaceManager</b><span>(rm)</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
Sets the parent of this JsonType object.
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#getParent-dynamic'>
|
||||
#
|
||||
(JsonType)
|
||||
<b>getParent</b><span>()</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
Get the parent of this JsonType.
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#setMutableDefault-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>setMutableDefault</b><span>(mutable)</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
Set if the default is 'mutable' or 'immutable'
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#val-dynamic'>
|
||||
~
|
||||
(Json)
|
||||
<b>val</b><span>()</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#_encode-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>_encode</b><span>()</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='note private title'>Private</span>
|
||||
<span class='desc'>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
<h2>Constructor Details</h2>
|
||||
<div class='methods'>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='constructor-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>constructor</b><span>(uid, initial_value, mutable)</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='tags'>
|
||||
<h3>Parameters:</h3>
|
||||
<ul class='param'>
|
||||
<li>
|
||||
<span class='name'>uid</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>Object</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>A unique identifier. If uid is undefined, a new uid will be created. </span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='name'>initial_value</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>Object</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>Create this operation with an initial value. </span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='name'>Whether</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>String|Boolean</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>the initial_value should be created as mutable. (Optional - see setMutableDefault) </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h2>Instance Method Details</h2>
|
||||
<div class='methods'>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='toJson-dynamic'>
|
||||
#
|
||||
(Json)
|
||||
<b>toJson</b><span>()</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>Transform this to a Json and loose all the sharing-abilities (the new object will be a deep clone)!</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
<h3>Returns:</h3>
|
||||
<ul class='return'>
|
||||
<li>
|
||||
<span class='type'></span>
|
||||
<tt>Json</tt>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='setReplaceManager-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>setReplaceManager</b><span>(rm)</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>Sets the parent of this JsonType object.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
<h3>See also:</h3>
|
||||
<ul class='see'>
|
||||
<li>
|
||||
<a href='WordType.setReplaceManager'>WordType.setReplaceManager</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='getParent-dynamic'>
|
||||
#
|
||||
(JsonType)
|
||||
<b>getParent</b><span>()</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>Get the parent of this JsonType.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
<h3>Returns:</h3>
|
||||
<ul class='return'>
|
||||
<li>
|
||||
<span class='type'></span>
|
||||
<tt><a href='../class/JsonType.html'>JsonType</a></tt>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='setMutableDefault-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>setMutableDefault</b><span>(mutable)</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>Set if the default is 'mutable' or 'immutable'</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
<h3>Parameters:</h3>
|
||||
<ul class='param'>
|
||||
<li>
|
||||
<span class='name'>mutable</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>String|Boolean</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>Set either 'mutable' / true or 'immutable' / false </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='val-dynamic'>
|
||||
~
|
||||
(Json)
|
||||
<b>val</b><span>()</span>
|
||||
<br>
|
||||
~
|
||||
(JsonType|WordType|String|Object)
|
||||
<b>val</b><span>(name)</span>
|
||||
<br>
|
||||
~
|
||||
(JsonType)
|
||||
<b>val</b><span>(name, content)</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='tags'>
|
||||
<div class='overloads'>
|
||||
<h3>Overloads:</h3>
|
||||
<div class='overload'>
|
||||
<p class='signature'>
|
||||
~
|
||||
(Json)
|
||||
<b>val</b><span>()</span>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>Get this as a Json object.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
<h3>Returns:</h3>
|
||||
<ul class='return'>
|
||||
<li>
|
||||
<span class='type'></span>
|
||||
<tt>Json</tt>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='overload'>
|
||||
<p class='signature'>
|
||||
~
|
||||
(JsonType|WordType|String|Object)
|
||||
<b>val</b><span>(name)</span>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>Get value of a property.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
<h3>Parameters:</h3>
|
||||
<ul class='param'>
|
||||
<li>
|
||||
<span class='name'>name</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>String</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>Name of the object property. </span>
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Returns:</h3>
|
||||
<ul class='return'>
|
||||
<li>
|
||||
<span class='type'></span>
|
||||
(
|
||||
<tt>JsonType|WordType|String|Object</tt>
|
||||
)
|
||||
—
|
||||
<span class='desc'>Depending on the value of the property. If mutable it will return a Operation-type object, if immutable it will return String/Object. </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='overload'>
|
||||
<p class='signature'>
|
||||
~
|
||||
(JsonType)
|
||||
<b>val</b><span>(name, content)</span>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>Set a new property.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
<h3>Parameters:</h3>
|
||||
<ul class='param'>
|
||||
<li>
|
||||
<span class='name'>name</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>String</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>Name of the object property. </span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='name'>content</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>Object|String</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>Content of the object property. </span>
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Returns:</h3>
|
||||
<ul class='return'>
|
||||
<li>
|
||||
<span class='type'></span>
|
||||
(
|
||||
<tt><a href='../class/JsonType.html'>JsonType</a></tt>
|
||||
)
|
||||
—
|
||||
<span class='desc'>This object. (supports chaining) </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='_encode-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>_encode</b><span>()</span>
|
||||
<span class='note private'>Private</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='tags'>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
August 24, 14 01:51:08 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
2.0.9
|
||||
✲
|
||||
Press H to see the keyboard shortcuts
|
||||
✲
|
||||
<a href='http://twitter.com/netzpirat' target='_parent'>@netzpirat</a>
|
||||
✲
|
||||
<a href='http://twitter.com/_inossidabile' target='_parent'>@_inossidabile</a>
|
||||
</div>
|
||||
<iframe id='search_frame'></iframe>
|
||||
<div id='fuzzySearch'>
|
||||
<input type='text'>
|
||||
<ol></ol>
|
||||
</div>
|
||||
<div id='help'>
|
||||
<p>
|
||||
Quickly fuzzy find classes, mixins, methods, file:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>T</span>
|
||||
Open fuzzy finder dialog
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
Control the navigation frame:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>L</span>
|
||||
Toggle list view
|
||||
</li>
|
||||
<li>
|
||||
<span>C</span>
|
||||
Show class list
|
||||
</li>
|
||||
<li>
|
||||
<span>I</span>
|
||||
Show mixin list
|
||||
</li>
|
||||
<li>
|
||||
<span>F</span>
|
||||
Show file list
|
||||
</li>
|
||||
<li>
|
||||
<span>M</span>
|
||||
Show method list
|
||||
</li>
|
||||
<li>
|
||||
<span>E</span>
|
||||
Show extras list
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
You can focus and blur the search input:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>S</span>
|
||||
Focus search input
|
||||
</li>
|
||||
<li>
|
||||
<span>Esc</span>
|
||||
Blur search input
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,213 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='UTF-8'>
|
||||
<title>Yatta! API</title>
|
||||
<script src='../javascript/application.js'></script>
|
||||
<script src='../javascript/search.js'></script>
|
||||
<link rel='stylesheet' href='../stylesheets/application.css' type='text/css'>
|
||||
</head>
|
||||
<body>
|
||||
<div id='base' data-path='../'></div>
|
||||
<div id='header'>
|
||||
<div id='menu'>
|
||||
<a href='../extra/README.md.html' title='Yatta!'>
|
||||
Yatta!
|
||||
</a>
|
||||
»
|
||||
<a href='../alphabetical_index.html' title='Index'>
|
||||
Index
|
||||
</a>
|
||||
»
|
||||
<span class='title'>JsonTypeWrapper</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id='content'>
|
||||
<h1>
|
||||
Class:
|
||||
JsonTypeWrapper
|
||||
</h1>
|
||||
<table class='box'>
|
||||
<tr>
|
||||
<td>Defined in:</td>
|
||||
<td>lib/Types/JsonTypes.coffee</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2>Overview</h2>
|
||||
<div class='docstring'>
|
||||
<div class='note'>
|
||||
<strong>Note:</strong>
|
||||
EXPERIMENTAL
|
||||
</div>
|
||||
<div class='note'>
|
||||
<strong>Note:</strong>
|
||||
You can only overwrite existing values! Setting a new property won't have any effect!
|
||||
</div>
|
||||
<p>A JsonTypeWrapper was intended to be a convenient wrapper for the JsonType.
|
||||
But it can make things more difficult than they are.</p><p>It creates Javascripts -getter and -setter methods for each property that JsonType maintains.</p><p>In order to set a new property you have to overwrite an existing property.
|
||||
Therefore the JsonTypeWrapper supports a special feature that should make things more convenient
|
||||
(we can argue about that, use the JsonType if you don't like it ;).
|
||||
If you overwrite an object property of the JsonTypeWrapper with a new object, it will result in a merged version of the objects.
|
||||
Let <code>yatta.value.p</code> the property that is to be overwritten and o the new value. E.g. <code>yatta.value.p = o</code></p><ul>
|
||||
<li>The result has all properties of o</li>
|
||||
<li>The result has all properties of w.p if they don't occur under the same property-name in o.</li>
|
||||
</ul>
|
||||
|
||||
<div class='examples'>
|
||||
<h3>Examples:</h3>
|
||||
<h4>
|
||||
create a JsonTypeWrapper
|
||||
</h4>
|
||||
<pre><code class='coffeescript'># You get a JsonTypeWrapper from a JsonType by calling
|
||||
w = yatta.value</code></pre>
|
||||
<h4>
|
||||
Getter Example
|
||||
</h4>
|
||||
<pre><code class='coffeescript'># you can access the x property of yatta by calling
|
||||
w.x
|
||||
# instead of
|
||||
yatta.val('x')</code></pre>
|
||||
<h4>
|
||||
Setter Example
|
||||
</h4>
|
||||
<pre><code class='coffeescript'># you can set an existing x property of yatta by calling
|
||||
w.x = "text"
|
||||
# instead of
|
||||
yatta.val('x', "text")</code></pre>
|
||||
<h4>
|
||||
Conflict Example
|
||||
</h4>
|
||||
<pre><code class='coffeescript'>yatta.value = {a : "string"}
|
||||
w = yatta.value
|
||||
console.log(w) # {a : "string"}
|
||||
w.a = {a : {b : "string"}}
|
||||
console.log(w) # {a : {b : "String"}}
|
||||
w.a = {a : {c : 4}}
|
||||
console.log(w) # {a : {b : "String", c : 4}}</code></pre>
|
||||
<h4>
|
||||
Common Pitfalls
|
||||
</h4>
|
||||
<pre><code class='coffeescript'>w = yatta.value
|
||||
# Setting a new property
|
||||
w.newProperty = "Awesome"
|
||||
console.log(w.newProperty == "Awesome") # false, w.newProperty is undefined
|
||||
# overwrite the w object
|
||||
w = {newProperty : "Awesome"}
|
||||
console.log(w.newProperty == "Awesome") # true!, but ..
|
||||
console.log(yatta.value.newProperty == "Awesome") # false, you are only allowed to set properties!
|
||||
# The solution
|
||||
yatta.value = {newProperty : "Awesome"}
|
||||
console.log(w.newProperty == "Awesome") # true!</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
<h3>See also:</h3>
|
||||
<ul class='see'>
|
||||
<li>
|
||||
<a href='../class/JsonType.html'>JsonType</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty'>https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<h2>Constructor Details</h2>
|
||||
<div class='methods'>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='constructor-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>constructor</b><span>(jsonType)</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='tags'>
|
||||
<h3>Parameters:</h3>
|
||||
<ul class='param'>
|
||||
<li>
|
||||
<span class='name'>jsonType</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt><a href='../class/JsonType.html'>JsonType</a></tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>Instance of the JsonType that this class wrappes. </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
August 24, 14 01:51:08 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
2.0.9
|
||||
✲
|
||||
Press H to see the keyboard shortcuts
|
||||
✲
|
||||
<a href='http://twitter.com/netzpirat' target='_parent'>@netzpirat</a>
|
||||
✲
|
||||
<a href='http://twitter.com/_inossidabile' target='_parent'>@_inossidabile</a>
|
||||
</div>
|
||||
<iframe id='search_frame'></iframe>
|
||||
<div id='fuzzySearch'>
|
||||
<input type='text'>
|
||||
<ol></ol>
|
||||
</div>
|
||||
<div id='help'>
|
||||
<p>
|
||||
Quickly fuzzy find classes, mixins, methods, file:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>T</span>
|
||||
Open fuzzy finder dialog
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
Control the navigation frame:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>L</span>
|
||||
Toggle list view
|
||||
</li>
|
||||
<li>
|
||||
<span>C</span>
|
||||
Show class list
|
||||
</li>
|
||||
<li>
|
||||
<span>I</span>
|
||||
Show mixin list
|
||||
</li>
|
||||
<li>
|
||||
<span>F</span>
|
||||
Show file list
|
||||
</li>
|
||||
<li>
|
||||
<span>M</span>
|
||||
Show method list
|
||||
</li>
|
||||
<li>
|
||||
<span>E</span>
|
||||
Show extras list
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
You can focus and blur the search input:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>S</span>
|
||||
Focus search input
|
||||
</li>
|
||||
<li>
|
||||
<span>Esc</span>
|
||||
Blur search input
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,213 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='UTF-8'>
|
||||
<title>Yatta! API</title>
|
||||
<script src='../javascript/application.js'></script>
|
||||
<script src='../javascript/search.js'></script>
|
||||
<link rel='stylesheet' href='../stylesheets/application.css' type='text/css'>
|
||||
</head>
|
||||
<body>
|
||||
<div id='base' data-path='../'></div>
|
||||
<div id='header'>
|
||||
<div id='menu'>
|
||||
<a href='../extra/README.md.html' title='Yatta!'>
|
||||
Yatta!
|
||||
</a>
|
||||
»
|
||||
<a href='../alphabetical_index.html' title='Index'>
|
||||
Index
|
||||
</a>
|
||||
»
|
||||
<span class='title'>JsonWrapper</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id='content'>
|
||||
<h1>
|
||||
Class:
|
||||
JsonWrapper
|
||||
</h1>
|
||||
<table class='box'>
|
||||
<tr>
|
||||
<td>Defined in:</td>
|
||||
<td>lib/Types/JsonTypes.coffee</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2>Overview</h2>
|
||||
<div class='docstring'>
|
||||
<div class='note'>
|
||||
<strong>Note:</strong>
|
||||
EXPERIMENTAL
|
||||
</div>
|
||||
<div class='note'>
|
||||
<strong>Note:</strong>
|
||||
You can only overwrite existing values! Setting a new property won't have any effect!
|
||||
</div>
|
||||
<p>A JsonWrapper was intended to be a convenient wrapper for the JsonType.
|
||||
But it can make things more difficult than they are.</p><p>It creates Javascripts -getter and -setter methods for each property that JsonType maintains.</p><p>In order to set a new property you have to overwrite an existing property.
|
||||
Therefore the JsonWrapper supports a special feature that should make things more convenient
|
||||
(we can argue about that, use the JsonType if you don't like it ;).
|
||||
If you overwrite an object property of the JsonWrapper with a new object, it will result in a merged version of the objects.
|
||||
Let <code>yatta.value.p</code> the property that is to be overwritten and o the new value. E.g. <code>yatta.value.p = o</code></p><ul>
|
||||
<li>The result has all properties of o</li>
|
||||
<li>The result has all properties of w.p if they don't occur under the same property-name in o.</li>
|
||||
</ul>
|
||||
|
||||
<div class='examples'>
|
||||
<h3>Examples:</h3>
|
||||
<h4>
|
||||
create a JsonWrapper
|
||||
</h4>
|
||||
<pre><code class='coffeescript'># You get a JsonWrapper from a JsonType by calling
|
||||
w = yatta.value</code></pre>
|
||||
<h4>
|
||||
Getter Example
|
||||
</h4>
|
||||
<pre><code class='coffeescript'># you can access the x property of yatta by calling
|
||||
w.x
|
||||
# instead of
|
||||
yatta.val('x')</code></pre>
|
||||
<h4>
|
||||
Setter Example
|
||||
</h4>
|
||||
<pre><code class='coffeescript'># you can set an existing x property of yatta by calling
|
||||
w.x = "text"
|
||||
# instead of
|
||||
yatta.val('x', "text")</code></pre>
|
||||
<h4>
|
||||
Conflict Example
|
||||
</h4>
|
||||
<pre><code class='coffeescript'>yatta.value = {a : "string"}
|
||||
w = yatta.value
|
||||
console.log(w) # {a : "string"}
|
||||
w.a = {a : {b : "string"}}
|
||||
console.log(w) # {a : {b : "String"}}
|
||||
w.a = {a : {c : 4}}
|
||||
console.log(w) # {a : {b : "String", c : 4}}</code></pre>
|
||||
<h4>
|
||||
Common Pitfalls
|
||||
</h4>
|
||||
<pre><code class='coffeescript'>w = yatta.value
|
||||
# Setting a new property
|
||||
w.newProperty = "Awesome"
|
||||
console.log(w.newProperty == "Awesome") # false, w.newProperty is undefined
|
||||
# overwrite the w object
|
||||
w = {newProperty : "Awesome"}
|
||||
console.log(w.newProperty == "Awesome") # true!, but ..
|
||||
console.log(yatta.value.newProperty == "Awesome") # false, you are only allowed to set properties!
|
||||
# The solution
|
||||
yatta.value = {newProperty : "Awesome"}
|
||||
console.log(w.newProperty == "Awesome") # true!</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
<h3>See also:</h3>
|
||||
<ul class='see'>
|
||||
<li>
|
||||
<a href='../class/JsonType.html'>JsonType</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty'>https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<h2>Constructor Details</h2>
|
||||
<div class='methods'>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='constructor-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>constructor</b><span>(jsonType)</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='tags'>
|
||||
<h3>Parameters:</h3>
|
||||
<ul class='param'>
|
||||
<li>
|
||||
<span class='name'>jsonType</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt><a href='../class/JsonType.html'>JsonType</a></tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>Instance of the JsonType that this class wrappes. </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
August 23, 14 21:38:13 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
2.0.9
|
||||
✲
|
||||
Press H to see the keyboard shortcuts
|
||||
✲
|
||||
<a href='http://twitter.com/netzpirat' target='_parent'>@netzpirat</a>
|
||||
✲
|
||||
<a href='http://twitter.com/_inossidabile' target='_parent'>@_inossidabile</a>
|
||||
</div>
|
||||
<iframe id='search_frame'></iframe>
|
||||
<div id='fuzzySearch'>
|
||||
<input type='text'>
|
||||
<ol></ol>
|
||||
</div>
|
||||
<div id='help'>
|
||||
<p>
|
||||
Quickly fuzzy find classes, mixins, methods, file:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>T</span>
|
||||
Open fuzzy finder dialog
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
Control the navigation frame:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>L</span>
|
||||
Toggle list view
|
||||
</li>
|
||||
<li>
|
||||
<span>C</span>
|
||||
Show class list
|
||||
</li>
|
||||
<li>
|
||||
<span>I</span>
|
||||
Show mixin list
|
||||
</li>
|
||||
<li>
|
||||
<span>F</span>
|
||||
Show file list
|
||||
</li>
|
||||
<li>
|
||||
<span>M</span>
|
||||
Show method list
|
||||
</li>
|
||||
<li>
|
||||
<span>E</span>
|
||||
Show extras list
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
You can focus and blur the search input:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>S</span>
|
||||
Focus search input
|
||||
</li>
|
||||
<li>
|
||||
<span>Esc</span>
|
||||
Blur search input
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,409 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='UTF-8'>
|
||||
<title>Yatta! API</title>
|
||||
<script src='../javascript/application.js'></script>
|
||||
<script src='../javascript/search.js'></script>
|
||||
<link rel='stylesheet' href='../stylesheets/application.css' type='text/css'>
|
||||
</head>
|
||||
<body>
|
||||
<div id='base' data-path='../'></div>
|
||||
<div id='header'>
|
||||
<div id='menu'>
|
||||
<a href='../extra/README.md.html' title='Yatta!'>
|
||||
Yatta!
|
||||
</a>
|
||||
»
|
||||
<a href='../alphabetical_index.html' title='Index'>
|
||||
Index
|
||||
</a>
|
||||
»
|
||||
<span class='title'>JsonYatta</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id='content'>
|
||||
<h1>
|
||||
Class:
|
||||
JsonYatta
|
||||
</h1>
|
||||
<table class='box'>
|
||||
<tr>
|
||||
<td>Defined in:</td>
|
||||
<td>lib/Frameworks/JsonYatta.coffee</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2>Overview</h2>
|
||||
<div class='docstring'>
|
||||
<p>Framework for Json data-structures.
|
||||
Known values that are supported:</p><ul>
|
||||
<li>String</li>
|
||||
<li>Integer</li>
|
||||
<li>Array</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<div class='tags'>
|
||||
</div>
|
||||
<h2>Instance Method Summary</h2>
|
||||
<ul class='summary'>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#getSharedObject-dynamic'>
|
||||
#
|
||||
(?)
|
||||
<b>getSharedObject</b><span>()</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#getConnector-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>getConnector</b><span>()</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
Get the initialized connector.
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#getHistoryBuffer-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>getHistoryBuffer</b><span>()</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#setMutableDefault-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>setMutableDefault</b><span>(mutable)</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#getUserId-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>getUserId</b><span>()</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
Get the UserId from the HistoryBuffer object.
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#toJson-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>toJson</b><span>()</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#val-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>val</b><span>(name, content, mutable)</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#on-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>on</b><span>()</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#deleteListener-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>deleteListener</b><span>()</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
<h2>Constructor Details</h2>
|
||||
<div class='methods'>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='constructor-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>constructor</b><span>(user_id, Connector)</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='tags'>
|
||||
<h3>Parameters:</h3>
|
||||
<ul class='param'>
|
||||
<li>
|
||||
<span class='name'>user_id</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>String</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>Unique id of the peer. </span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='name'>Connector</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>Connector</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>the connector class. </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h2>Instance Method Details</h2>
|
||||
<div class='methods'>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='getSharedObject-dynamic'>
|
||||
#
|
||||
(?)
|
||||
<b>getSharedObject</b><span>()</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='tags'>
|
||||
<h3>Returns:</h3>
|
||||
<ul class='return'>
|
||||
<li>
|
||||
<span class='type'></span>
|
||||
(
|
||||
<tt>?</tt>
|
||||
)
|
||||
—
|
||||
<span class='desc'>JsonType </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='getConnector-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>getConnector</b><span>()</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>Get the initialized connector.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='getHistoryBuffer-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>getHistoryBuffer</b><span>()</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='tags'>
|
||||
<h3>See also:</h3>
|
||||
<ul class='see'>
|
||||
<li>
|
||||
<a href='HistoryBuffer'>HistoryBuffer</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='setMutableDefault-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>setMutableDefault</b><span>(mutable)</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='tags'>
|
||||
<h3>See also:</h3>
|
||||
<ul class='see'>
|
||||
<li>
|
||||
<a href='JsonType.setMutableDefault'>JsonType.setMutableDefault</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='getUserId-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>getUserId</b><span>()</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>Get the UserId from the HistoryBuffer object.
|
||||
In most cases this will be the same as the user_id value with which
|
||||
JsonYatta was initialized (Depending on the HistoryBuffer implementation).</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='toJson-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>toJson</b><span>()</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='tags'>
|
||||
<h3>See also:</h3>
|
||||
<ul class='see'>
|
||||
<li>
|
||||
<a href='JsonType.toJson'>JsonType.toJson</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='val-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>val</b><span>(name, content, mutable)</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='tags'>
|
||||
<h3>See also:</h3>
|
||||
<ul class='see'>
|
||||
<li>
|
||||
<a href='JsonType.val'>JsonType.val</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='on-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>on</b><span>()</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='tags'>
|
||||
<h3>See also:</h3>
|
||||
<ul class='see'>
|
||||
<li>
|
||||
<a href='Operation.on'>Operation.on</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='deleteListener-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>deleteListener</b><span>()</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='tags'>
|
||||
<h3>See also:</h3>
|
||||
<ul class='see'>
|
||||
<li>
|
||||
<a href='Operation.deleteListener'>Operation.deleteListener</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
August 23, 14 21:18:25 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
2.0.9
|
||||
✲
|
||||
Press H to see the keyboard shortcuts
|
||||
✲
|
||||
<a href='http://twitter.com/netzpirat' target='_parent'>@netzpirat</a>
|
||||
✲
|
||||
<a href='http://twitter.com/_inossidabile' target='_parent'>@_inossidabile</a>
|
||||
</div>
|
||||
<iframe id='search_frame'></iframe>
|
||||
<div id='fuzzySearch'>
|
||||
<input type='text'>
|
||||
<ol></ol>
|
||||
</div>
|
||||
<div id='help'>
|
||||
<p>
|
||||
Quickly fuzzy find classes, mixins, methods, file:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>T</span>
|
||||
Open fuzzy finder dialog
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
Control the navigation frame:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>L</span>
|
||||
Toggle list view
|
||||
</li>
|
||||
<li>
|
||||
<span>C</span>
|
||||
Show class list
|
||||
</li>
|
||||
<li>
|
||||
<span>I</span>
|
||||
Show mixin list
|
||||
</li>
|
||||
<li>
|
||||
<span>F</span>
|
||||
Show file list
|
||||
</li>
|
||||
<li>
|
||||
<span>M</span>
|
||||
Show method list
|
||||
</li>
|
||||
<li>
|
||||
<span>E</span>
|
||||
Show extras list
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
You can focus and blur the search input:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>S</span>
|
||||
Focus search input
|
||||
</li>
|
||||
<li>
|
||||
<span>Esc</span>
|
||||
Blur search input
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,296 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='UTF-8'>
|
||||
<title>Yatta! API</title>
|
||||
<script src='../javascript/application.js'></script>
|
||||
<script src='../javascript/search.js'></script>
|
||||
<link rel='stylesheet' href='../stylesheets/application.css' type='text/css'>
|
||||
</head>
|
||||
<body>
|
||||
<div id='base' data-path='../'></div>
|
||||
<div id='header'>
|
||||
<div id='menu'>
|
||||
<a href='../extra/README.md.html' title='Yatta!'>
|
||||
Yatta!
|
||||
</a>
|
||||
»
|
||||
<a href='../alphabetical_index.html' title='Index'>
|
||||
Index
|
||||
</a>
|
||||
»
|
||||
<span class='title'>PeerJsConnector</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id='content'>
|
||||
<h1>
|
||||
Class:
|
||||
PeerJsConnector
|
||||
</h1>
|
||||
<table class='box'>
|
||||
<tr>
|
||||
<td>Defined in:</td>
|
||||
<td>lib/Connectors/PeerJsConnector.coffee</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2>Overview</h2>
|
||||
<div class='docstring'>
|
||||
<p>PeerJs is a Framework that enables you to connect to other peers. You just need the
|
||||
user-id of the peer (browser/client). And then you can connect to it.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
<h3>See also:</h3>
|
||||
<ul class='see'>
|
||||
<li>
|
||||
<a href='http://peerjs.com'>http://peerjs.com</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<h2>Instance Method Summary</h2>
|
||||
<ul class='summary'>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#connectToPeer-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>connectToPeer</b><span>(id)</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
Connect the Framework to another peer.
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#getAllConnectionIds-dynamic'>
|
||||
#
|
||||
(Array<String>)
|
||||
<b>getAllConnectionIds</b><span>()</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
Receive the id of every connected peer.
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#addConnection-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>addConnection</b><span>(conn)</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
Adds an existing connection to this connector.
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
<h2>Constructor Details</h2>
|
||||
<div class='methods'>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='constructor-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>constructor</b><span>(engine, HB, execution_listener, yatta)</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='tags'>
|
||||
<h3>Parameters:</h3>
|
||||
<ul class='param'>
|
||||
<li>
|
||||
<span class='name'>engine</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>Engine</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>The transformation engine </span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='name'>HB</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>HistoryBuffer</tt>
|
||||
)
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='name'>execution_listener</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>Array<Function></tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>You must ensure that whenever an operation is executed, every function in this Array is called. </span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='name'>yatta</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>Yatta</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>The Yatta framework. </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h2>Instance Method Details</h2>
|
||||
<div class='methods'>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='connectToPeer-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>connectToPeer</b><span>(id)</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>Connect the Framework to another peer. Therefore you have to receive his
|
||||
user_id. If the other peer is connected to other peers, the PeerJsConnector
|
||||
will automatically connect to them too.</p><p>Transmitting the user_id is your job.
|
||||
See <a href="../../examples/TextEditing/">TextEditing</a> for a nice example
|
||||
on how to do that with urls.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
<h3>Parameters:</h3>
|
||||
<ul class='param'>
|
||||
<li>
|
||||
<span class='name'>id</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>String</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>Connection id </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='getAllConnectionIds-dynamic'>
|
||||
#
|
||||
(Array<String>)
|
||||
<b>getAllConnectionIds</b><span>()</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>Receive the id of every connected peer.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
<h3>Returns:</h3>
|
||||
<ul class='return'>
|
||||
<li>
|
||||
<span class='type'></span>
|
||||
(
|
||||
<tt>Array<String></tt>
|
||||
)
|
||||
—
|
||||
<span class='desc'>A list of Peer-Ids </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='addConnection-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>addConnection</b><span>(conn)</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>Adds an existing connection to this connector.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
<h3>Parameters:</h3>
|
||||
<ul class='param'>
|
||||
<li>
|
||||
<span class='name'>conn</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>PeerJsConnection</tt>
|
||||
)
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
August 24, 14 01:51:08 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
2.0.9
|
||||
✲
|
||||
Press H to see the keyboard shortcuts
|
||||
✲
|
||||
<a href='http://twitter.com/netzpirat' target='_parent'>@netzpirat</a>
|
||||
✲
|
||||
<a href='http://twitter.com/_inossidabile' target='_parent'>@_inossidabile</a>
|
||||
</div>
|
||||
<iframe id='search_frame'></iframe>
|
||||
<div id='fuzzySearch'>
|
||||
<input type='text'>
|
||||
<ol></ol>
|
||||
</div>
|
||||
<div id='help'>
|
||||
<p>
|
||||
Quickly fuzzy find classes, mixins, methods, file:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>T</span>
|
||||
Open fuzzy finder dialog
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
Control the navigation frame:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>L</span>
|
||||
Toggle list view
|
||||
</li>
|
||||
<li>
|
||||
<span>C</span>
|
||||
Show class list
|
||||
</li>
|
||||
<li>
|
||||
<span>I</span>
|
||||
Show mixin list
|
||||
</li>
|
||||
<li>
|
||||
<span>F</span>
|
||||
Show file list
|
||||
</li>
|
||||
<li>
|
||||
<span>M</span>
|
||||
Show method list
|
||||
</li>
|
||||
<li>
|
||||
<span>E</span>
|
||||
Show extras list
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
You can focus and blur the search input:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>S</span>
|
||||
Focus search input
|
||||
</li>
|
||||
<li>
|
||||
<span>Esc</span>
|
||||
Blur search input
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,285 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='UTF-8'>
|
||||
<title>Yatta! API</title>
|
||||
<script src='../javascript/application.js'></script>
|
||||
<script src='../javascript/search.js'></script>
|
||||
<link rel='stylesheet' href='../stylesheets/application.css' type='text/css'>
|
||||
</head>
|
||||
<body>
|
||||
<div id='base' data-path='../'></div>
|
||||
<div id='header'>
|
||||
<div id='menu'>
|
||||
<a href='../extra/README.md.html' title='Yatta!'>
|
||||
Yatta!
|
||||
</a>
|
||||
»
|
||||
<a href='../alphabetical_index.html' title='Index'>
|
||||
Index
|
||||
</a>
|
||||
»
|
||||
<span class='title'>Replaceable</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id='content'>
|
||||
<h1>
|
||||
Class:
|
||||
Replaceable
|
||||
</h1>
|
||||
<table class='box'>
|
||||
<tr>
|
||||
<td>Defined in:</td>
|
||||
<td>lib/Types/StructuredTypes.coffee</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Inherits:</td>
|
||||
<td>
|
||||
types.Insert
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2>Overview</h2>
|
||||
<div class='docstring'>
|
||||
<p>The ReplaceManager manages Replaceables.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
<h3>See also:</h3>
|
||||
<ul class='see'>
|
||||
<li>
|
||||
<a href='ReplaceManager'>ReplaceManager</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<h2>Instance Method Summary</h2>
|
||||
<ul class='summary'>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#val-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>val</b><span>()</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
Return the content that this operation holds.
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#replace-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>replace</b><span>(content)</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
Replace the content of this replaceable with new content.
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#execute-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>execute</b><span>()</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
If possible set the replace manager in the content.
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#_encode-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>_encode</b><span>()</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
Encode this operation in such a way that it can be parsed by remote peers.
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
<h2>Constructor Details</h2>
|
||||
<div class='methods'>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='constructor-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>constructor</b><span>(content, parent, uid, prev, next, origin)</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='tags'>
|
||||
<h3>Parameters:</h3>
|
||||
<ul class='param'>
|
||||
<li>
|
||||
<span class='name'>content</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>Operation</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>The value that this Replaceable holds. </span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='name'>parent</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>ReplaceManager</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>Used to replace this Replaceable with another one. </span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='name'>uid</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>Object</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>A unique identifier. If uid is undefined, a new uid will be created. </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h2>Instance Method Details</h2>
|
||||
<div class='methods'>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='val-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>val</b><span>()</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>Return the content that this operation holds.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='replace-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>replace</b><span>(content)</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>Replace the content of this replaceable with new content.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='execute-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>execute</b><span>()</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>If possible set the replace manager in the content.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
<h3>See also:</h3>
|
||||
<ul class='see'>
|
||||
<li>
|
||||
<a href='Word.setReplaceManager'>Word.setReplaceManager</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='_encode-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>_encode</b><span>()</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>Encode this operation in such a way that it can be parsed by remote peers.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
August 23, 14 17:02:46 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
2.0.9
|
||||
✲
|
||||
Press H to see the keyboard shortcuts
|
||||
✲
|
||||
<a href='http://twitter.com/netzpirat' target='_parent'>@netzpirat</a>
|
||||
✲
|
||||
<a href='http://twitter.com/_inossidabile' target='_parent'>@_inossidabile</a>
|
||||
</div>
|
||||
<iframe id='search_frame'></iframe>
|
||||
<div id='fuzzySearch'>
|
||||
<input type='text'>
|
||||
<ol></ol>
|
||||
</div>
|
||||
<div id='help'>
|
||||
<p>
|
||||
Quickly fuzzy find classes, mixins, methods, file:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>T</span>
|
||||
Open fuzzy finder dialog
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
Control the navigation frame:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>L</span>
|
||||
Toggle list view
|
||||
</li>
|
||||
<li>
|
||||
<span>C</span>
|
||||
Show class list
|
||||
</li>
|
||||
<li>
|
||||
<span>I</span>
|
||||
Show mixin list
|
||||
</li>
|
||||
<li>
|
||||
<span>F</span>
|
||||
Show file list
|
||||
</li>
|
||||
<li>
|
||||
<span>M</span>
|
||||
Show method list
|
||||
</li>
|
||||
<li>
|
||||
<span>E</span>
|
||||
Show extras list
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
You can focus and blur the search input:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>S</span>
|
||||
Focus search input
|
||||
</li>
|
||||
<li>
|
||||
<span>Esc</span>
|
||||
Blur search input
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,430 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='UTF-8'>
|
||||
<title>Yatta! API</title>
|
||||
<script src='../javascript/application.js'></script>
|
||||
<script src='../javascript/search.js'></script>
|
||||
<link rel='stylesheet' href='../stylesheets/application.css' type='text/css'>
|
||||
</head>
|
||||
<body>
|
||||
<div id='base' data-path='../'></div>
|
||||
<div id='header'>
|
||||
<div id='menu'>
|
||||
<a href='../extra/README.md.html' title='Yatta!'>
|
||||
Yatta!
|
||||
</a>
|
||||
»
|
||||
<a href='../alphabetical_index.html' title='Index'>
|
||||
Index
|
||||
</a>
|
||||
»
|
||||
<span class='title'>TextFramework</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id='content'>
|
||||
<h1>
|
||||
Class:
|
||||
TextFramework
|
||||
</h1>
|
||||
<table class='box'>
|
||||
<tr>
|
||||
<td>Defined in:</td>
|
||||
<td>lib/Frameworks/TextFramework.coffee</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2>Overview</h2>
|
||||
<div class='docstring'>
|
||||
<p>Framework for Text Datastructures.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
</div>
|
||||
<h2>Instance Method Summary</h2>
|
||||
<ul class='summary'>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#getSharedObject-dynamic'>
|
||||
#
|
||||
(?)
|
||||
<b>getSharedObject</b><span>()</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#getConnector-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>getConnector</b><span>()</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
Get the initialized connector.
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#getHistoryBuffer-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>getHistoryBuffer</b><span>()</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#getUserId-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>getUserId</b><span>()</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
Get the UserId from the HistoryBuffer object.
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#val-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>val</b><span>()</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#insertText-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>insertText</b><span>(pos, content)</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#deleteText-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>deleteText</b><span>(pos, length)</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#bind-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>bind</b><span>(textarea)</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#replaceText-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>replaceText</b><span>(text)</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#on-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>on</b><span>()</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
<h2>Constructor Details</h2>
|
||||
<div class='methods'>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='constructor-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>constructor</b><span>(user_id, Connector)</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='tags'>
|
||||
<h3>Parameters:</h3>
|
||||
<ul class='param'>
|
||||
<li>
|
||||
<span class='name'>user_id</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>String</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>Uniqe user id that defines this peer. </span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='name'>Connector</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>Connector</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>The connector defines how you connect to the other peers. </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h2>Instance Method Details</h2>
|
||||
<div class='methods'>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='getSharedObject-dynamic'>
|
||||
#
|
||||
(?)
|
||||
<b>getSharedObject</b><span>()</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='tags'>
|
||||
<h3>Returns:</h3>
|
||||
<ul class='return'>
|
||||
<li>
|
||||
<span class='type'></span>
|
||||
(
|
||||
<tt>?</tt>
|
||||
)
|
||||
—
|
||||
<span class='desc'>WordType </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='getConnector-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>getConnector</b><span>()</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>Get the initialized connector.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='getHistoryBuffer-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>getHistoryBuffer</b><span>()</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='tags'>
|
||||
<h3>See also:</h3>
|
||||
<ul class='see'>
|
||||
<li>
|
||||
<a href='HistoryBuffer'>HistoryBuffer</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='getUserId-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>getUserId</b><span>()</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>Get the UserId from the HistoryBuffer object.
|
||||
In most cases this will be the same as the user_id value with which
|
||||
JsonFramework was initialized (Depending on the HistoryBuffer implementation).</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='val-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>val</b><span>()</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='tags'>
|
||||
<h3>See also:</h3>
|
||||
<ul class='see'>
|
||||
<li>
|
||||
<a href='JsonType.val'>JsonType.val</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='insertText-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>insertText</b><span>(pos, content)</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='tags'>
|
||||
<h3>See also:</h3>
|
||||
<ul class='see'>
|
||||
<li>
|
||||
<a href='WordType.insertText'>WordType.insertText</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='deleteText-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>deleteText</b><span>(pos, length)</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='tags'>
|
||||
<h3>See also:</h3>
|
||||
<ul class='see'>
|
||||
<li>
|
||||
<a href='WordType.deleteText'>WordType.deleteText</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='bind-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>bind</b><span>(textarea)</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='tags'>
|
||||
<h3>See also:</h3>
|
||||
<ul class='see'>
|
||||
<li>
|
||||
<a href='WordType.bind'>WordType.bind</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='replaceText-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>replaceText</b><span>(text)</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='tags'>
|
||||
<h3>See also:</h3>
|
||||
<ul class='see'>
|
||||
<li>
|
||||
<a href='WordType.replaceText'>WordType.replaceText</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='on-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>on</b><span>()</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='tags'>
|
||||
<h3>See also:</h3>
|
||||
<ul class='see'>
|
||||
<li>
|
||||
<a href='Operation.on'>Operation.on</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
August 24, 14 01:51:08 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
2.0.9
|
||||
✲
|
||||
Press H to see the keyboard shortcuts
|
||||
✲
|
||||
<a href='http://twitter.com/netzpirat' target='_parent'>@netzpirat</a>
|
||||
✲
|
||||
<a href='http://twitter.com/_inossidabile' target='_parent'>@_inossidabile</a>
|
||||
</div>
|
||||
<iframe id='search_frame'></iframe>
|
||||
<div id='fuzzySearch'>
|
||||
<input type='text'>
|
||||
<ol></ol>
|
||||
</div>
|
||||
<div id='help'>
|
||||
<p>
|
||||
Quickly fuzzy find classes, mixins, methods, file:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>T</span>
|
||||
Open fuzzy finder dialog
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
Control the navigation frame:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>L</span>
|
||||
Toggle list view
|
||||
</li>
|
||||
<li>
|
||||
<span>C</span>
|
||||
Show class list
|
||||
</li>
|
||||
<li>
|
||||
<span>I</span>
|
||||
Show mixin list
|
||||
</li>
|
||||
<li>
|
||||
<span>F</span>
|
||||
Show file list
|
||||
</li>
|
||||
<li>
|
||||
<span>M</span>
|
||||
Show method list
|
||||
</li>
|
||||
<li>
|
||||
<span>E</span>
|
||||
Show extras list
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
You can focus and blur the search input:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>S</span>
|
||||
Focus search input
|
||||
</li>
|
||||
<li>
|
||||
<span>Esc</span>
|
||||
Blur search input
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,457 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='UTF-8'>
|
||||
<title>Yatta! API</title>
|
||||
<script src='../javascript/application.js'></script>
|
||||
<script src='../javascript/search.js'></script>
|
||||
<link rel='stylesheet' href='../stylesheets/application.css' type='text/css'>
|
||||
</head>
|
||||
<body>
|
||||
<div id='base' data-path='../'></div>
|
||||
<div id='header'>
|
||||
<div id='menu'>
|
||||
<a href='../extra/README.md.html' title='Yatta!'>
|
||||
Yatta!
|
||||
</a>
|
||||
»
|
||||
<a href='../alphabetical_index.html' title='Index'>
|
||||
Index
|
||||
</a>
|
||||
»
|
||||
<span class='title'>TextYatta</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id='content'>
|
||||
<h1>
|
||||
Class:
|
||||
TextYatta
|
||||
</h1>
|
||||
<table class='box'>
|
||||
<tr>
|
||||
<td>Defined in:</td>
|
||||
<td>lib/Frameworks/TextYatta.coffee</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2>Overview</h2>
|
||||
<div class='docstring'>
|
||||
<p>Framework for Text Datastructures.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
</div>
|
||||
<h2>Instance Method Summary</h2>
|
||||
<ul class='summary'>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#getSharedObject-dynamic'>
|
||||
#
|
||||
(?)
|
||||
<b>getSharedObject</b><span>()</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#getEngine-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>getEngine</b><span>()</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#getConnector-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>getConnector</b><span>()</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
Get the initialized connector.
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#getHistoryBuffer-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>getHistoryBuffer</b><span>()</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#getUserId-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>getUserId</b><span>()</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
Get the UserId from the HistoryBuffer object.
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#val-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>val</b><span>()</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#insertText-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>insertText</b><span>(pos, content)</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#deleteText-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>deleteText</b><span>(pos, length)</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#bind-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>bind</b><span>(textarea)</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#replaceText-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>replaceText</b><span>(text)</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#on-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>on</b><span>()</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
<h2>Constructor Details</h2>
|
||||
<div class='methods'>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='constructor-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>constructor</b><span>(user_id, Connector)</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='tags'>
|
||||
<h3>Parameters:</h3>
|
||||
<ul class='param'>
|
||||
<li>
|
||||
<span class='name'>user_id</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>String</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>Uniqe user id that defines this peer. </span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='name'>Connector</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>Connector</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>The connector defines how you connect to the other peers. </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h2>Instance Method Details</h2>
|
||||
<div class='methods'>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='getSharedObject-dynamic'>
|
||||
#
|
||||
(?)
|
||||
<b>getSharedObject</b><span>()</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='tags'>
|
||||
<h3>Returns:</h3>
|
||||
<ul class='return'>
|
||||
<li>
|
||||
<span class='type'></span>
|
||||
(
|
||||
<tt>?</tt>
|
||||
)
|
||||
—
|
||||
<span class='desc'>Word </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='getEngine-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>getEngine</b><span>()</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='tags'>
|
||||
<h3>See also:</h3>
|
||||
<ul class='see'>
|
||||
<li>
|
||||
<a href='Engine'>Engine</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='getConnector-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>getConnector</b><span>()</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>Get the initialized connector.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='getHistoryBuffer-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>getHistoryBuffer</b><span>()</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='tags'>
|
||||
<h3>See also:</h3>
|
||||
<ul class='see'>
|
||||
<li>
|
||||
<a href='HistoryBuffer'>HistoryBuffer</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='getUserId-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>getUserId</b><span>()</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>Get the UserId from the HistoryBuffer object.
|
||||
In most cases this will be the same as the user_id value with which
|
||||
JsonYatta was initialized (Depending on the HistoryBuffer implementation).</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='val-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>val</b><span>()</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='tags'>
|
||||
<h3>See also:</h3>
|
||||
<ul class='see'>
|
||||
<li>
|
||||
<a href='JsonType.val'>JsonType.val</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='insertText-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>insertText</b><span>(pos, content)</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='tags'>
|
||||
<h3>See also:</h3>
|
||||
<ul class='see'>
|
||||
<li>
|
||||
<a href='Word.insertText'>Word.insertText</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='deleteText-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>deleteText</b><span>(pos, length)</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='tags'>
|
||||
<h3>See also:</h3>
|
||||
<ul class='see'>
|
||||
<li>
|
||||
<a href='Word.deleteText'>Word.deleteText</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='bind-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>bind</b><span>(textarea)</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='tags'>
|
||||
<h3>See also:</h3>
|
||||
<ul class='see'>
|
||||
<li>
|
||||
<a href='Word.bind'>Word.bind</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='replaceText-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>replaceText</b><span>(text)</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='tags'>
|
||||
<h3>See also:</h3>
|
||||
<ul class='see'>
|
||||
<li>
|
||||
<a href='Word.replaceText'>Word.replaceText</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='on-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>on</b><span>()</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='tags'>
|
||||
<h3>See also:</h3>
|
||||
<ul class='see'>
|
||||
<li>
|
||||
<a href='Operation.on'>Operation.on</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
August 23, 14 21:18:25 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
2.0.9
|
||||
✲
|
||||
Press H to see the keyboard shortcuts
|
||||
✲
|
||||
<a href='http://twitter.com/netzpirat' target='_parent'>@netzpirat</a>
|
||||
✲
|
||||
<a href='http://twitter.com/_inossidabile' target='_parent'>@_inossidabile</a>
|
||||
</div>
|
||||
<iframe id='search_frame'></iframe>
|
||||
<div id='fuzzySearch'>
|
||||
<input type='text'>
|
||||
<ol></ol>
|
||||
</div>
|
||||
<div id='help'>
|
||||
<p>
|
||||
Quickly fuzzy find classes, mixins, methods, file:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>T</span>
|
||||
Open fuzzy finder dialog
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
Control the navigation frame:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>L</span>
|
||||
Toggle list view
|
||||
</li>
|
||||
<li>
|
||||
<span>C</span>
|
||||
Show class list
|
||||
</li>
|
||||
<li>
|
||||
<span>I</span>
|
||||
Show mixin list
|
||||
</li>
|
||||
<li>
|
||||
<span>F</span>
|
||||
Show file list
|
||||
</li>
|
||||
<li>
|
||||
<span>M</span>
|
||||
Show method list
|
||||
</li>
|
||||
<li>
|
||||
<span>E</span>
|
||||
Show extras list
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
You can focus and blur the search input:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>S</span>
|
||||
Focus search input
|
||||
</li>
|
||||
<li>
|
||||
<span>Esc</span>
|
||||
Blur search input
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,419 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='UTF-8'>
|
||||
<title>Yatta! API</title>
|
||||
<script src='../javascript/application.js'></script>
|
||||
<script src='../javascript/search.js'></script>
|
||||
<link rel='stylesheet' href='../stylesheets/application.css' type='text/css'>
|
||||
</head>
|
||||
<body>
|
||||
<div id='base' data-path='../'></div>
|
||||
<div id='header'>
|
||||
<div id='menu'>
|
||||
<a href='../extra/README.md.html' title='Yatta!'>
|
||||
Yatta!
|
||||
</a>
|
||||
»
|
||||
<a href='../alphabetical_index.html' title='Index'>
|
||||
Index
|
||||
</a>
|
||||
»
|
||||
<span class='title'>Word</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id='content'>
|
||||
<h1>
|
||||
Class:
|
||||
Word
|
||||
</h1>
|
||||
<table class='box'>
|
||||
<tr>
|
||||
<td>Defined in:</td>
|
||||
<td>lib/Types/TextTypes.coffee</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Inherits:</td>
|
||||
<td>
|
||||
types.ListManager
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2>Overview</h2>
|
||||
<div class='docstring'>
|
||||
<div class='note'>
|
||||
<strong>Note:</strong>
|
||||
Currently, only Text is supported!
|
||||
</div>
|
||||
<p>Handles a Word-like data structures with support for insertText/deleteText at a word-position.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
</div>
|
||||
<h2>Instance Method Summary</h2>
|
||||
<ul class='summary'>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#insertText-dynamic'>
|
||||
#
|
||||
(Word)
|
||||
<b>insertText</b><span>(position, content)</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
Inserts a string into the word.
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#deleteText-dynamic'>
|
||||
#
|
||||
(Word)
|
||||
<b>deleteText</b><span>(position, length)</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
Deletes a part of the word.
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#replaceText-dynamic'>
|
||||
#
|
||||
(Word)
|
||||
<b>replaceText</b><span>(text)</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
Replace the content of this word with another one.
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#val-dynamic'>
|
||||
#
|
||||
(String)
|
||||
<b>val</b><span>()</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#toString-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>toString</b><span>()</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
Same as Word.val
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#setReplaceManager-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>setReplaceManager</b><span>(op)</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='note private title'>Private</span>
|
||||
<span class='desc'>
|
||||
In most cases you would embed a Word in a Replaceable, wich is handled by the ReplaceManager in order to provide replace functionality.
|
||||
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#bind-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>bind</b><span>(textfield)</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
Bind this Word to a textfield or input field.
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#_encode-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>_encode</b><span>()</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='note private title'>Private</span>
|
||||
<span class='desc'>
|
||||
Encode this operation in such a way that it can be parsed by remote peers.
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
<h2>Constructor Details</h2>
|
||||
<div class='methods'>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='constructor-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>constructor</b><span>(uid, beginning, end, prev, next, origin)</span>
|
||||
<span class='note private'>Private</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='tags'>
|
||||
<h3>Parameters:</h3>
|
||||
<ul class='param'>
|
||||
<li>
|
||||
<span class='name'>uid</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>Object</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>A unique identifier. If uid is undefined, a new uid will be created. </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h2>Instance Method Details</h2>
|
||||
<div class='methods'>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='insertText-dynamic'>
|
||||
#
|
||||
(Word)
|
||||
<b>insertText</b><span>(position, content)</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>Inserts a string into the word.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
<h3>Returns:</h3>
|
||||
<ul class='return'>
|
||||
<li>
|
||||
<span class='type'></span>
|
||||
(
|
||||
<tt><a href='../class/Word.html'>Word</a></tt>
|
||||
)
|
||||
—
|
||||
<span class='desc'>This Word object. </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='deleteText-dynamic'>
|
||||
#
|
||||
(Word)
|
||||
<b>deleteText</b><span>(position, length)</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>Deletes a part of the word.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
<h3>Returns:</h3>
|
||||
<ul class='return'>
|
||||
<li>
|
||||
<span class='type'></span>
|
||||
(
|
||||
<tt><a href='../class/Word.html'>Word</a></tt>
|
||||
)
|
||||
—
|
||||
<span class='desc'>This Word object </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='replaceText-dynamic'>
|
||||
#
|
||||
(Word)
|
||||
<b>replaceText</b><span>(text)</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>Replace the content of this word with another one. Concurrent replacements are not merged!
|
||||
Only one of the replacements will be used.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
<h3>Returns:</h3>
|
||||
<ul class='return'>
|
||||
<li>
|
||||
<span class='type'></span>
|
||||
(
|
||||
<tt><a href='../class/Word.html'>Word</a></tt>
|
||||
)
|
||||
—
|
||||
<span class='desc'>Returns the new Word object. </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='val-dynamic'>
|
||||
#
|
||||
(String)
|
||||
<b>val</b><span>()</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='tags'>
|
||||
<h3>Returns:</h3>
|
||||
<ul class='return'>
|
||||
<li>
|
||||
<span class='type'></span>
|
||||
(
|
||||
<tt>String</tt>
|
||||
)
|
||||
—
|
||||
<span class='desc'>The String-representation of this object. </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='toString-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>toString</b><span>()</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>Same as Word.val</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
<h3>See also:</h3>
|
||||
<ul class='see'>
|
||||
<li>
|
||||
<a href='Word.val'>Word.val</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='setReplaceManager-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>setReplaceManager</b><span>(op)</span>
|
||||
<span class='note private'>Private</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>In most cases you would embed a Word in a Replaceable, wich is handled by the ReplaceManager in order
|
||||
to provide replace functionality.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='bind-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>bind</b><span>(textfield)</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>Bind this Word to a textfield or input field.</p>
|
||||
<div class='examples'>
|
||||
<h3>Examples:</h3>
|
||||
<h4>
|
||||
|
||||
</h4>
|
||||
<pre><code class='coffeescript'>var textbox = document.getElementById("textfield");
|
||||
yatta.bind(textbox);</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='_encode-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>_encode</b><span>()</span>
|
||||
<span class='note private'>Private</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>Encode this operation in such a way that it can be parsed by remote peers.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
August 23, 14 21:38:13 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
2.0.9
|
||||
✲
|
||||
Press H to see the keyboard shortcuts
|
||||
✲
|
||||
<a href='http://twitter.com/netzpirat' target='_parent'>@netzpirat</a>
|
||||
✲
|
||||
<a href='http://twitter.com/_inossidabile' target='_parent'>@_inossidabile</a>
|
||||
</div>
|
||||
<iframe id='search_frame'></iframe>
|
||||
<div id='fuzzySearch'>
|
||||
<input type='text'>
|
||||
<ol></ol>
|
||||
</div>
|
||||
<div id='help'>
|
||||
<p>
|
||||
Quickly fuzzy find classes, mixins, methods, file:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>T</span>
|
||||
Open fuzzy finder dialog
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
Control the navigation frame:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>L</span>
|
||||
Toggle list view
|
||||
</li>
|
||||
<li>
|
||||
<span>C</span>
|
||||
Show class list
|
||||
</li>
|
||||
<li>
|
||||
<span>I</span>
|
||||
Show mixin list
|
||||
</li>
|
||||
<li>
|
||||
<span>F</span>
|
||||
Show file list
|
||||
</li>
|
||||
<li>
|
||||
<span>M</span>
|
||||
Show method list
|
||||
</li>
|
||||
<li>
|
||||
<span>E</span>
|
||||
Show extras list
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
You can focus and blur the search input:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>S</span>
|
||||
Focus search input
|
||||
</li>
|
||||
<li>
|
||||
<span>Esc</span>
|
||||
Blur search input
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,449 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='UTF-8'>
|
||||
<title>Yatta! API</title>
|
||||
<script src='../javascript/application.js'></script>
|
||||
<script src='../javascript/search.js'></script>
|
||||
<link rel='stylesheet' href='../stylesheets/application.css' type='text/css'>
|
||||
</head>
|
||||
<body>
|
||||
<div id='base' data-path='../'></div>
|
||||
<div id='header'>
|
||||
<div id='menu'>
|
||||
<a href='../extra/README.md.html' title='Yatta!'>
|
||||
Yatta!
|
||||
</a>
|
||||
»
|
||||
<a href='../alphabetical_index.html' title='Index'>
|
||||
Index
|
||||
</a>
|
||||
»
|
||||
<span class='title'>WordType</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id='content'>
|
||||
<h1>
|
||||
Class:
|
||||
WordType
|
||||
</h1>
|
||||
<table class='box'>
|
||||
<tr>
|
||||
<td>Defined in:</td>
|
||||
<td>lib/Types/TextTypes.coffee</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Inherits:</td>
|
||||
<td>
|
||||
types.ListManager
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2>Overview</h2>
|
||||
<div class='docstring'>
|
||||
<div class='note'>
|
||||
<strong>Note:</strong>
|
||||
Currently, only Text is supported!
|
||||
</div>
|
||||
<p>Handles a WordType-like data structures with support for insertText/deleteText at a word-position.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
</div>
|
||||
<h2>Variables Summary</h2>
|
||||
<dl class='constants'>
|
||||
<dt id='type-variable'>
|
||||
type
|
||||
=
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code class='coffeescript'>"WordType"</code></pre>
|
||||
<div class='docstring'>
|
||||
<p>Identifies this class.
|
||||
Use it to check whether this is a word-type or something else.</p>
|
||||
<div class='examples'>
|
||||
<h3>Examples:</h3>
|
||||
<h4>
|
||||
|
||||
</h4>
|
||||
<pre><code class='coffeescript'>var x = yatta.val('unknown')
|
||||
if (x.type === "WordType") {
|
||||
console.log JSON.stringify(x.toJson())
|
||||
}</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<h2>Instance Method Summary</h2>
|
||||
<ul class='summary'>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#insertText-dynamic'>
|
||||
#
|
||||
(WordType)
|
||||
<b>insertText</b><span>(position, content)</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
Inserts a string into the word.
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#deleteText-dynamic'>
|
||||
#
|
||||
(WordType)
|
||||
<b>deleteText</b><span>(position, length)</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
Deletes a part of the word.
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#replaceText-dynamic'>
|
||||
#
|
||||
(WordType)
|
||||
<b>replaceText</b><span>(text)</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
Replace the content of this word with another one.
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#val-dynamic'>
|
||||
#
|
||||
(String)
|
||||
<b>val</b><span>()</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
Get the String-representation of this word.
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#toString-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>toString</b><span>()</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
Same as WordType.val
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#setReplaceManager-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>setReplaceManager</b><span>(op)</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='note private title'>Private</span>
|
||||
<span class='desc'>
|
||||
In most cases you would embed a WordType in a Replaceable, wich is handled by the ReplaceManager in order to provide replace functionality.
|
||||
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#bind-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>bind</b><span>(textfield)</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
Bind this WordType to a textfield or input field.
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#_encode-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>_encode</b><span>()</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='note private title'>Private</span>
|
||||
<span class='desc'>
|
||||
Encode this operation in such a way that it can be parsed by remote peers.
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
<h2>Constructor Details</h2>
|
||||
<div class='methods'>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='constructor-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>constructor</b><span>(uid, beginning, end, prev, next, origin)</span>
|
||||
<span class='note private'>Private</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='tags'>
|
||||
<h3>Parameters:</h3>
|
||||
<ul class='param'>
|
||||
<li>
|
||||
<span class='name'>uid</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>Object</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>A unique identifier. If uid is undefined, a new uid will be created. </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h2>Instance Method Details</h2>
|
||||
<div class='methods'>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='insertText-dynamic'>
|
||||
#
|
||||
(WordType)
|
||||
<b>insertText</b><span>(position, content)</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>Inserts a string into the word.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
<h3>Returns:</h3>
|
||||
<ul class='return'>
|
||||
<li>
|
||||
<span class='type'></span>
|
||||
(
|
||||
<tt><a href='../class/WordType.html'>WordType</a></tt>
|
||||
)
|
||||
—
|
||||
<span class='desc'>This WordType object. </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='deleteText-dynamic'>
|
||||
#
|
||||
(WordType)
|
||||
<b>deleteText</b><span>(position, length)</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>Deletes a part of the word.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
<h3>Returns:</h3>
|
||||
<ul class='return'>
|
||||
<li>
|
||||
<span class='type'></span>
|
||||
(
|
||||
<tt><a href='../class/WordType.html'>WordType</a></tt>
|
||||
)
|
||||
—
|
||||
<span class='desc'>This WordType object </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='replaceText-dynamic'>
|
||||
#
|
||||
(WordType)
|
||||
<b>replaceText</b><span>(text)</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>Replace the content of this word with another one. Concurrent replacements are not merged!
|
||||
Only one of the replacements will be used.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
<h3>Returns:</h3>
|
||||
<ul class='return'>
|
||||
<li>
|
||||
<span class='type'></span>
|
||||
(
|
||||
<tt><a href='../class/WordType.html'>WordType</a></tt>
|
||||
)
|
||||
—
|
||||
<span class='desc'>Returns the new WordType object. </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='val-dynamic'>
|
||||
#
|
||||
(String)
|
||||
<b>val</b><span>()</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>Get the String-representation of this word.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
<h3>Returns:</h3>
|
||||
<ul class='return'>
|
||||
<li>
|
||||
<span class='type'></span>
|
||||
(
|
||||
<tt>String</tt>
|
||||
)
|
||||
—
|
||||
<span class='desc'>The String-representation of this object. </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='toString-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>toString</b><span>()</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>Same as WordType.val</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
<h3>See also:</h3>
|
||||
<ul class='see'>
|
||||
<li>
|
||||
<a href='WordType.val'>WordType.val</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='setReplaceManager-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>setReplaceManager</b><span>(op)</span>
|
||||
<span class='note private'>Private</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>In most cases you would embed a WordType in a Replaceable, wich is handled by the ReplaceManager in order
|
||||
to provide replace functionality.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='bind-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>bind</b><span>(textfield)</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>Bind this WordType to a textfield or input field.</p>
|
||||
<div class='examples'>
|
||||
<h3>Examples:</h3>
|
||||
<h4>
|
||||
|
||||
</h4>
|
||||
<pre><code class='coffeescript'>var textbox = document.getElementById("textfield");
|
||||
yatta.bind(textbox);</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
</div>
|
||||
</div>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='_encode-dynamic'>
|
||||
#
|
||||
(void)
|
||||
<b>_encode</b><span>()</span>
|
||||
<span class='note private'>Private</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='docstring'>
|
||||
<p>Encode this operation in such a way that it can be parsed by remote peers.</p>
|
||||
</div>
|
||||
<div class='tags'>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
August 24, 14 01:51:08 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
2.0.9
|
||||
✲
|
||||
Press H to see the keyboard shortcuts
|
||||
✲
|
||||
<a href='http://twitter.com/netzpirat' target='_parent'>@netzpirat</a>
|
||||
✲
|
||||
<a href='http://twitter.com/_inossidabile' target='_parent'>@_inossidabile</a>
|
||||
</div>
|
||||
<iframe id='search_frame'></iframe>
|
||||
<div id='fuzzySearch'>
|
||||
<input type='text'>
|
||||
<ol></ol>
|
||||
</div>
|
||||
<div id='help'>
|
||||
<p>
|
||||
Quickly fuzzy find classes, mixins, methods, file:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>T</span>
|
||||
Open fuzzy finder dialog
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
Control the navigation frame:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>L</span>
|
||||
Toggle list view
|
||||
</li>
|
||||
<li>
|
||||
<span>C</span>
|
||||
Show class list
|
||||
</li>
|
||||
<li>
|
||||
<span>I</span>
|
||||
Show mixin list
|
||||
</li>
|
||||
<li>
|
||||
<span>F</span>
|
||||
Show file list
|
||||
</li>
|
||||
<li>
|
||||
<span>M</span>
|
||||
Show method list
|
||||
</li>
|
||||
<li>
|
||||
<span>E</span>
|
||||
Show extras list
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
You can focus and blur the search input:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>S</span>
|
||||
Focus search input
|
||||
</li>
|
||||
<li>
|
||||
<span>Esc</span>
|
||||
Blur search input
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,100 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='UTF-8'>
|
||||
<title>Yatta! API</title>
|
||||
<script src='javascript/application.js'></script>
|
||||
<script src='javascript/search.js'></script>
|
||||
<link rel='stylesheet' href='stylesheets/application.css' type='text/css'>
|
||||
</head>
|
||||
<body class='list'>
|
||||
<div class='list tree' id='content'>
|
||||
<h1 class='full_list_header'>Class List</h1>
|
||||
<nav>
|
||||
<a target='_self' href='class_list.html'>
|
||||
Classes
|
||||
</a>
|
||||
<a target='_self' href='file_list.html'>
|
||||
Files
|
||||
</a>
|
||||
<a target='_self' href='method_list.html'>
|
||||
Methods
|
||||
</a>
|
||||
<a target='_self' href='extra_list.html'>
|
||||
Extras
|
||||
</a>
|
||||
</nav>
|
||||
<div id='search'>
|
||||
Search:
|
||||
<input type='text'>
|
||||
</div>
|
||||
<ul>
|
||||
<li>
|
||||
<a href='class/IwcConnector.html' target='main'>
|
||||
IwcConnector
|
||||
</a>
|
||||
<small class='namespace'>
|
||||
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/PeerJsConnector.html' target='main'>
|
||||
PeerJsConnector
|
||||
</a>
|
||||
<small class='namespace'>
|
||||
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/JsonFramework.html' target='main'>
|
||||
JsonFramework
|
||||
</a>
|
||||
<small class='namespace'>
|
||||
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/TextFramework.html' target='main'>
|
||||
TextFramework
|
||||
</a>
|
||||
<small class='namespace'>
|
||||
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/JsonTypeWrapper.html' target='main'>
|
||||
JsonTypeWrapper
|
||||
</a>
|
||||
<small class='namespace'>
|
||||
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/JsonType.html' target='main'>
|
||||
JsonType
|
||||
</a>
|
||||
<small class='parent'>
|
||||
<
|
||||
types.MapManager
|
||||
</small>
|
||||
<small class='namespace'>
|
||||
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/WordType.html' target='main'>
|
||||
WordType
|
||||
</a>
|
||||
<small class='parent'>
|
||||
<
|
||||
types.ListManager
|
||||
</small>
|
||||
<small class='namespace'>
|
||||
|
||||
</small>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,112 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='UTF-8'>
|
||||
<title>Yatta! API</title>
|
||||
<script src='../javascript/application.js'></script>
|
||||
<script src='../javascript/search.js'></script>
|
||||
<link rel='stylesheet' href='../stylesheets/application.css' type='text/css'>
|
||||
</head>
|
||||
<body>
|
||||
<div id='base' data-path='../'></div>
|
||||
<div id='header'>
|
||||
<div id='menu'>
|
||||
<a href='../extra/README.md.html' title='Yatta!'>
|
||||
Yatta!
|
||||
</a>
|
||||
»
|
||||
<a href='../alphabetical_index.html' title='Index'>
|
||||
Index
|
||||
</a>
|
||||
»
|
||||
<span class='title'>LICENSE.txt</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id='content'>
|
||||
<nav class='toc'>
|
||||
<p class='title'>
|
||||
<a class='hide_toc' href='#'>
|
||||
<strong>Table of Contents</strong>
|
||||
</a>
|
||||
<small>
|
||||
(<a class='float_toc' href='#'>left</a>)
|
||||
</small>
|
||||
</p>
|
||||
</nav>
|
||||
<div id='filecontents'>
|
||||
<p>The MIT License (MIT)<br/><br/>Copyright (c) 2014 Kevin Jahns <kevin.jahns@rwth-aachen.de>.<br/><br/>Permission is hereby granted, free of charge, to any person obtaining a copy<br/>of this software and associated documentation files (the "Software"), to deal<br/>in the Software without restriction, including without limitation the rights<br/>to use, copy, modify, merge, publish, distribute, sublicense, and/or sell<br/>copies of the Software, and to permit persons to whom the Software is<br/>furnished to do so, subject to the following conditions:<br/><br/>The above copyright notice and this permission notice shall be included in all<br/>copies or substantial portions of the Software.<br/><br/>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR<br/>IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,<br/>FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE<br/>AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER<br/>LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,<br/>OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE<br/>SOFTWARE.<br/></p>
|
||||
</div>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
August 24, 14 01:51:08 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
2.0.9
|
||||
✲
|
||||
Press H to see the keyboard shortcuts
|
||||
✲
|
||||
<a href='http://twitter.com/netzpirat' target='_parent'>@netzpirat</a>
|
||||
✲
|
||||
<a href='http://twitter.com/_inossidabile' target='_parent'>@_inossidabile</a>
|
||||
</div>
|
||||
<iframe id='search_frame'></iframe>
|
||||
<div id='fuzzySearch'>
|
||||
<input type='text'>
|
||||
<ol></ol>
|
||||
</div>
|
||||
<div id='help'>
|
||||
<p>
|
||||
Quickly fuzzy find classes, mixins, methods, file:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>T</span>
|
||||
Open fuzzy finder dialog
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
Control the navigation frame:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>L</span>
|
||||
Toggle list view
|
||||
</li>
|
||||
<li>
|
||||
<span>C</span>
|
||||
Show class list
|
||||
</li>
|
||||
<li>
|
||||
<span>I</span>
|
||||
Show mixin list
|
||||
</li>
|
||||
<li>
|
||||
<span>F</span>
|
||||
Show file list
|
||||
</li>
|
||||
<li>
|
||||
<span>M</span>
|
||||
Show method list
|
||||
</li>
|
||||
<li>
|
||||
<span>E</span>
|
||||
Show extras list
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
You can focus and blur the search input:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>S</span>
|
||||
Focus search input
|
||||
</li>
|
||||
<li>
|
||||
<span>Esc</span>
|
||||
Blur search input
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,153 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='UTF-8'>
|
||||
<title>Yatta! API</title>
|
||||
<script src='../javascript/application.js'></script>
|
||||
<script src='../javascript/search.js'></script>
|
||||
<link rel='stylesheet' href='../stylesheets/application.css' type='text/css'>
|
||||
</head>
|
||||
<body>
|
||||
<div id='base' data-path='../'></div>
|
||||
<div id='header'>
|
||||
<div id='menu'>
|
||||
<a href='../extra/README.md.html' title='Yatta!'>
|
||||
Yatta!
|
||||
</a>
|
||||
»
|
||||
<a href='../alphabetical_index.html' title='Index'>
|
||||
Index
|
||||
</a>
|
||||
»
|
||||
<span class='title'>README.md</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id='content'>
|
||||
<nav class='toc'>
|
||||
<p class='title'>
|
||||
<a class='hide_toc' href='#'>
|
||||
<strong>Table of Contents</strong>
|
||||
</a>
|
||||
<small>
|
||||
(<a class='float_toc' href='#'>left</a>)
|
||||
</small>
|
||||
</p>
|
||||
</nav>
|
||||
<div id='filecontents'>
|
||||
<h1 id="-yatta-extras-imgs-yatta_logo-png-raw-true-"><img src="./extras/imgs/Yatta_logo.png?raw=true" alt="Yatta!"></h1><p>A Real-Time web framework that manages concurrency control for arbitrary data structures.
|
||||
Yatta! provides similar functionality as <a href="https://github.com/share/ShareJS">ShareJs</a> and <a href="https://github.com/opencoweb/coweb">OpenCoweb</a>,
|
||||
but does not require you to understand how the internals work. The predefined data structures provide a simple API to access your shared data structures.</p><p>Predefined data structures:</p><ul>
|
||||
<li>Text - <a href="http://dadamonad.github.io/Yatta/examples/TextEditing/">Collaborative Text Editing Example</a> and <a href="./examples/TextEditing/">Source</a></li>
|
||||
<li>Json - <a href="./examples/PeerJs-Json/">Tutorial</a></li>
|
||||
<li>XML (coming soon)</li>
|
||||
</ul><p>Unlike other frameworks, Yatta! supports P2P message propagation and is not bound to a specific communication protocol.</p><p>It is possible to add any communication protocol to Yatta. Currently it supports:</p><ul>
|
||||
<li><a href="http://peerjs.com/">PeerJs</a> - A WebRTC Framework</li>
|
||||
<li><a href="http://dbis.rwth-aachen.de/cms/projects/the-xmpp-experience#interwidget-communication">IWC</a> - Inter-widget Communication</li>
|
||||
</ul>
|
||||
<h2 id="use-it-">Use it!</h2><p>The <a href="./examples/">examples</a> provide an excellent starting point for beginners. Also the <a href="http://dadamonad.github.io/Yatta/doc/">API Documentation</a> could prove to be very helpful.</p><p>Either clone this git repository, install it with <a href="http://bower.io/">bower</a>, or install it with <a href="https://www.npmjs.org/package/yatta">npm</a>.</p><h3 id="bower">Bower</h3>
|
||||
<pre><code>bower install Yatta
|
||||
</code></pre><p>Then you include the libraries directly from the installation folder.</p><h3 id="npm">Npm</h3>
|
||||
<pre><code>npm install yatta --save
|
||||
</code></pre><p>And use it like this with <em>npm</em>:</p><pre><code>Y = require("yatta");
|
||||
Y.createPeerJsConnector({key: 'xxx'}, function(Connector, user_id){
|
||||
yatta = new Y.JsonFramework(user_id, Connector);
|
||||
</code></pre><h2 id="about">About</h2><p>Find out more about the concurrent editing problem here
|
||||
<a href="http://opencoweb.org/ocwdocs/intro/openg.html">Cooperation, Concurrency, Conflicts, and Convergence</a> and here
|
||||
<a href="http://en.wikipedia.org/wiki/Operational_transformation">Operational Transformation (OT)</a></p><p>My Bachelor Thesis project aim was to develop a P2P OT Framework that enables collaboration on XML documents and supports
|
||||
<a href="http://www3.ntu.edu.sg/home/czsun/projects/otfaq/#intentionPreservation">Intention Preservation</a>.
|
||||
After some time I realized that OT has significant drawbacks in P2P environments.</p><p>With my gained experiences I came up with a new approach. I named it <em>Yata</em> - Yet Another Transformation Approach.
|
||||
It enables concurrent editing with the following space and time properties:</p><ul>
|
||||
<li>Time complexity: O(S), whereby S is the number of operations that are inserted concurrently at the same position (no transformation against operations that happen on different positions).</li>
|
||||
<li>Space complexity = O(|Document|), whereby |Document| is the size of the shared document.</li>
|
||||
</ul><p>This means that my approach beats all OT time complexities. Furthermore, Yatta has a very strict definition of Intention Preservation, and I was able to
|
||||
show that it is never violated.</p><p>Another advantage of Yata is that propagated messages are very small.
|
||||
Background: In Real-Time P2P OT algorithms you have to send a state-vector with each message that defines the state of the History Buffer
|
||||
on which the operation was created. This is not necessary in Yata.</p><p>The downside of this approach is that the History Buffer holds at least as many operations as there are characters in the document.
|
||||
In contrast, an OT algorithm can have an empty History Buffer while the document size is very big.</p><p>Eventually (after my thesis), I will publish more information about Yata.</p><p>So, how did I come up with the name for the implementation (Yatta! is not Yata)?
|
||||
Yatta! means "I did it!" in Japanese. You scream it when you accomplish something (for proper application I refer to the Yatta-man in <a href="http://heroeswiki.com/Yatta!">Heroes</a>).
|
||||
There is also this awesome video on the Internet that will change your life <a href="https://www.youtube.com/watch?v=kL5DDSglM_s">Yatta</a>.</p><h2 id="status">Status</h2><p>Yatta! is still in an early development phase. Don't expect that everything is working fine.
|
||||
But I would become really motivated if you gave me some feedback :) (<a href="https://github.com/DadaMonad/Yatta/issues">github</a>).</p><h3 id="current-issues">Current Issues</h3><p>Currently, I don't perform Garbage Collection. Therefore, the space requirement will never decrease.</p><ul>
|
||||
<li>Garbage Collection</li>
|
||||
<li>XML support</li>
|
||||
</ul>
|
||||
<h2 id="support">Support</h2><p>Please report any issues to the <a href="https://github.com/DadaMonad/Yatta/issues">Github issue page</a>!</p><h2 id="license">License</h2><p>Yatta! is licensed under the <a href="./LICENSE.txt">MIT License</a>.</p><a href="mailto:kevin.jahns@rwth-aachen.de">kevin.jahns@rwth-aachen.de</a>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
August 24, 14 01:51:08 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
2.0.9
|
||||
✲
|
||||
Press H to see the keyboard shortcuts
|
||||
✲
|
||||
<a href='http://twitter.com/netzpirat' target='_parent'>@netzpirat</a>
|
||||
✲
|
||||
<a href='http://twitter.com/_inossidabile' target='_parent'>@_inossidabile</a>
|
||||
</div>
|
||||
<iframe id='search_frame'></iframe>
|
||||
<div id='fuzzySearch'>
|
||||
<input type='text'>
|
||||
<ol></ol>
|
||||
</div>
|
||||
<div id='help'>
|
||||
<p>
|
||||
Quickly fuzzy find classes, mixins, methods, file:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>T</span>
|
||||
Open fuzzy finder dialog
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
Control the navigation frame:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>L</span>
|
||||
Toggle list view
|
||||
</li>
|
||||
<li>
|
||||
<span>C</span>
|
||||
Show class list
|
||||
</li>
|
||||
<li>
|
||||
<span>I</span>
|
||||
Show mixin list
|
||||
</li>
|
||||
<li>
|
||||
<span>F</span>
|
||||
Show file list
|
||||
</li>
|
||||
<li>
|
||||
<span>M</span>
|
||||
Show method list
|
||||
</li>
|
||||
<li>
|
||||
<span>E</span>
|
||||
Show extras list
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
You can focus and blur the search input:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>S</span>
|
||||
Focus search input
|
||||
</li>
|
||||
<li>
|
||||
<span>Esc</span>
|
||||
Blur search input
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 868 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 9.0 KiB |
@@ -1,357 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="381.09735"
|
||||
height="187.42168"
|
||||
id="svg7976"
|
||||
version="1.1"
|
||||
inkscape:version="0.48.4 r9939"
|
||||
sodipodi:docname="Yatta_logo.svg">
|
||||
<defs
|
||||
id="defs7978">
|
||||
<marker
|
||||
inkscape:stockid="Arrow2Lend"
|
||||
orient="auto"
|
||||
refY="0"
|
||||
refX="0"
|
||||
id="Arrow2Lend"
|
||||
style="overflow:visible">
|
||||
<path
|
||||
id="path4310"
|
||||
style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round"
|
||||
d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
|
||||
transform="matrix(-1.1,0,0,-1.1,-1.1,0)"
|
||||
inkscape:connector-curvature="0" />
|
||||
</marker>
|
||||
<marker
|
||||
inkscape:stockid="Arrow2Mend"
|
||||
orient="auto"
|
||||
refY="0"
|
||||
refX="0"
|
||||
id="Arrow2Mend"
|
||||
style="overflow:visible">
|
||||
<path
|
||||
id="path4316"
|
||||
style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round"
|
||||
d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
|
||||
transform="scale(-0.6,-0.6)"
|
||||
inkscape:connector-curvature="0" />
|
||||
</marker>
|
||||
<marker
|
||||
inkscape:stockid="Arrow2Mstart"
|
||||
orient="auto"
|
||||
refY="0"
|
||||
refX="0"
|
||||
id="Arrow2Mstart"
|
||||
style="overflow:visible">
|
||||
<path
|
||||
id="path4313"
|
||||
style="fill-rule:evenodd;stroke-width:0.625;stroke-linejoin:round"
|
||||
d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
|
||||
transform="scale(0.6,0.6)"
|
||||
inkscape:connector-curvature="0" />
|
||||
</marker>
|
||||
<marker
|
||||
inkscape:stockid="Arrow1Send"
|
||||
orient="auto"
|
||||
refY="0"
|
||||
refX="0"
|
||||
id="Arrow1Send"
|
||||
style="overflow:visible">
|
||||
<path
|
||||
id="path4304"
|
||||
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
|
||||
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt"
|
||||
transform="matrix(-0.2,0,0,-0.2,-1.2,0)"
|
||||
inkscape:connector-curvature="0" />
|
||||
</marker>
|
||||
<marker
|
||||
inkscape:stockid="Arrow1Sstart"
|
||||
orient="auto"
|
||||
refY="0"
|
||||
refX="0"
|
||||
id="Arrow1Sstart"
|
||||
style="overflow:visible">
|
||||
<path
|
||||
id="path4301"
|
||||
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
|
||||
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt"
|
||||
transform="matrix(0.2,0,0,0.2,1.2,0)"
|
||||
inkscape:connector-curvature="0" />
|
||||
</marker>
|
||||
<marker
|
||||
inkscape:stockid="Arrow1Lend"
|
||||
orient="auto"
|
||||
refY="0"
|
||||
refX="0"
|
||||
id="Arrow1Lend"
|
||||
style="overflow:visible">
|
||||
<path
|
||||
id="path4292"
|
||||
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
|
||||
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt"
|
||||
transform="matrix(-0.8,0,0,-0.8,-10,0)"
|
||||
inkscape:connector-curvature="0" />
|
||||
</marker>
|
||||
<marker
|
||||
inkscape:stockid="Arrow1Lstart"
|
||||
orient="auto"
|
||||
refY="0"
|
||||
refX="0"
|
||||
id="Arrow1Lstart"
|
||||
style="overflow:visible">
|
||||
<path
|
||||
id="path4289"
|
||||
d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
|
||||
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt"
|
||||
transform="matrix(0.8,0,0,0.8,10,0)"
|
||||
inkscape:connector-curvature="0" />
|
||||
</marker>
|
||||
<inkscape:path-effect
|
||||
effect="skeletal"
|
||||
id="path-effect8752"
|
||||
is_visible="true"
|
||||
pattern="M 0,5 C 0,2.24 2.24,0 5,0 7.76,0 10,2.24 10,5 10,7.76 7.76,10 5,10 2.24,10 0,7.76 0,5 z"
|
||||
copytype="single_stretched"
|
||||
prop_scale="1"
|
||||
scale_y_rel="false"
|
||||
spacing="0"
|
||||
normal_offset="0"
|
||||
tang_offset="0"
|
||||
prop_units="false"
|
||||
vertical_pattern="false"
|
||||
fuse_tolerance="0" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="1.979899"
|
||||
inkscape:cx="158.87513"
|
||||
inkscape:cy="178.66098"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
inkscape:snap-grids="true"
|
||||
inkscape:window-width="1280"
|
||||
inkscape:window-height="979"
|
||||
inkscape:window-x="-4"
|
||||
inkscape:window-y="-3"
|
||||
inkscape:window-maximized="1"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0" />
|
||||
<metadata
|
||||
id="metadata7981">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(-67.225249,-76.895)">
|
||||
<g
|
||||
id="g8648"
|
||||
transform="matrix(3.8957433,0,0,3.8957433,-180.76316,-209.47544)">
|
||||
<rect
|
||||
ry="6.0883365"
|
||||
rx="0"
|
||||
y="102.509"
|
||||
x="63.834892"
|
||||
height="12.488896"
|
||||
width="9.4584417"
|
||||
id="rect7986"
|
||||
style="fill:#ffbd58;fill-opacity:1;stroke:#ffb8bd;stroke-width:0.38039941;stroke-opacity:1" />
|
||||
<text
|
||||
sodipodi:linespacing="0%"
|
||||
id="text7988"
|
||||
y="113.49197"
|
||||
x="64.593651"
|
||||
style="font-size:13px;font-style:normal;font-weight:normal;line-height:0%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
|
||||
xml:space="preserve"><tspan
|
||||
y="113.49197"
|
||||
x="64.593651"
|
||||
id="tspan7990"
|
||||
sodipodi:role="line">Y</tspan></text>
|
||||
</g>
|
||||
<g
|
||||
id="g8653"
|
||||
transform="matrix(3.8957433,0,0,3.8957433,-189.0027,-263.0938)">
|
||||
<rect
|
||||
ry="6.0883365"
|
||||
rx="0"
|
||||
y="116.27232"
|
||||
x="87.952286"
|
||||
height="12.488896"
|
||||
width="9.4584417"
|
||||
id="rect7986-6"
|
||||
style="fill:#ffbd58;fill-opacity:1;stroke:#ffb8bd;stroke-width:0.38039941;stroke-opacity:1" />
|
||||
<text
|
||||
sodipodi:linespacing="0%"
|
||||
id="text7988-7"
|
||||
y="127.25529"
|
||||
x="88.238144"
|
||||
style="font-size:13px;font-style:normal;font-weight:normal;line-height:0%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
|
||||
xml:space="preserve"><tspan
|
||||
y="127.25529"
|
||||
x="88.238144"
|
||||
id="tspan7990-9"
|
||||
sodipodi:role="line">A</tspan></text>
|
||||
</g>
|
||||
<g
|
||||
id="g8658"
|
||||
transform="matrix(3.8957433,0,0,3.8957433,-183.96057,-337.86438)">
|
||||
<rect
|
||||
ry="6.0883365"
|
||||
rx="0"
|
||||
y="135.46521"
|
||||
x="108.6604"
|
||||
height="12.488896"
|
||||
width="9.4584417"
|
||||
id="rect7986-6-7"
|
||||
style="fill:#ffbd58;fill-opacity:1;stroke:#ffb8bd;stroke-width:0.38039941;stroke-opacity:1" />
|
||||
<text
|
||||
sodipodi:linespacing="0%"
|
||||
id="text7988-7-9"
|
||||
y="146.44818"
|
||||
x="109.41916"
|
||||
style="font-size:13px;font-style:normal;font-weight:normal;line-height:0%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
|
||||
xml:space="preserve"><tspan
|
||||
y="146.44818"
|
||||
x="109.41916"
|
||||
id="tspan7990-9-0"
|
||||
sodipodi:role="line">T</tspan></text>
|
||||
</g>
|
||||
<g
|
||||
id="g8663"
|
||||
transform="matrix(3.8957433,0,0,3.8957433,-266.47882,-397.87764)">
|
||||
<rect
|
||||
ry="6.0883365"
|
||||
rx="0"
|
||||
y="150.87004"
|
||||
x="151.84442"
|
||||
height="12.488896"
|
||||
width="9.4584417"
|
||||
id="rect7986-6-4"
|
||||
style="fill:#ffbd58;fill-opacity:1;stroke:#ffb8bd;stroke-width:0.38039941;stroke-opacity:1" />
|
||||
<text
|
||||
sodipodi:linespacing="0%"
|
||||
id="text7988-7-97"
|
||||
y="161.85301"
|
||||
x="152.13028"
|
||||
style="font-size:13px;font-style:normal;font-weight:normal;line-height:0%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
|
||||
xml:space="preserve"><tspan
|
||||
y="161.85301"
|
||||
x="152.13028"
|
||||
id="tspan7990-9-4"
|
||||
sodipodi:role="line">A</tspan></text>
|
||||
</g>
|
||||
<g
|
||||
id="g8673"
|
||||
transform="matrix(3.8957433,0,0,3.8957433,-624.46772,-357.54085)">
|
||||
<rect
|
||||
ry="6.0883365"
|
||||
rx="0"
|
||||
y="140.51598"
|
||||
x="265.73914"
|
||||
height="12.488896"
|
||||
width="9.4584417"
|
||||
id="rect7986-6-5"
|
||||
style="fill:#ffbd58;fill-opacity:1;stroke:#ffb8bd;stroke-width:0.38039941;stroke-opacity:1" />
|
||||
<text
|
||||
sodipodi:linespacing="0%"
|
||||
id="text7988-7-7"
|
||||
y="151.49895"
|
||||
x="267.86264"
|
||||
style="font-size:13px;font-style:normal;font-weight:normal;line-height:0%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
|
||||
xml:space="preserve"><tspan
|
||||
y="151.49895"
|
||||
x="267.86264"
|
||||
id="tspan7990-9-5"
|
||||
sodipodi:role="line">!</tspan></text>
|
||||
</g>
|
||||
<g
|
||||
id="g8668"
|
||||
transform="matrix(3.8957433,0,0,3.8957433,-712.02806,-577.9551)">
|
||||
<rect
|
||||
ry="6.0883365"
|
||||
rx="0"
|
||||
y="168.29517"
|
||||
x="255.13252"
|
||||
height="12.488896"
|
||||
width="9.4584417"
|
||||
id="rect7986-6-8"
|
||||
style="fill:#ffbd58;fill-opacity:1;stroke:#ffb8bd;stroke-width:0.38039941;stroke-opacity:1" />
|
||||
<text
|
||||
sodipodi:linespacing="0%"
|
||||
id="text7988-7-3"
|
||||
y="179.27814"
|
||||
x="255.89128"
|
||||
style="font-size:13px;font-style:normal;font-weight:normal;line-height:0%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
|
||||
xml:space="preserve"><tspan
|
||||
y="179.27814"
|
||||
x="255.89128"
|
||||
id="tspan7990-9-00"
|
||||
sodipodi:role="line">T</tspan></text>
|
||||
</g>
|
||||
<path
|
||||
style="fill:none;stroke:#69ff00;stroke-width:1.94787169;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-start:none;marker-mid:none;marker-end:none"
|
||||
d="m 96.675142,237.77416 c 16.915998,34.61882 42.117198,33.88572 61.980908,-0.98383"
|
||||
id="path8783"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
style="fill:none;stroke:#69ff00;stroke-width:1.94787169;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-start:none;marker-mid:none;marker-end:none"
|
||||
d="m 185.71118,237.28685 c 16.91602,34.61881 42.11721,33.88572 61.98091,-0.98384"
|
||||
id="path8783-3"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
style="fill:none;stroke:#69ff00;stroke-width:1.94787169;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-start:none;marker-mid:none;marker-end:none"
|
||||
d="m 356.89652,237.28685 c 16.916,34.61881 42.11719,33.88572 61.98093,-0.98384"
|
||||
id="path8783-8"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:2.33744597;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:2.0999999;stroke-opacity:1;stroke-dasharray:none;marker-end:url(#Arrow2Mend)"
|
||||
d="m 299.79777,126.3332 -1.43872,66.18503"
|
||||
id="path10517"
|
||||
inkscape:connector-type="polyline"
|
||||
inkscape:connector-curvature="0"
|
||||
inkscape:connection-start="#g8668"
|
||||
inkscape:connection-start-point="d4"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
style="fill:none;stroke:#ff4f00;stroke-width:1.55829763;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="m 258.02225,189.56679 c -6.2228,-60.38318 2.94629,-87.18398 25.5794,-84.60886"
|
||||
id="path11677"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
style="fill:none;stroke:#ff4f00;stroke-width:1.55829763;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="m 345.28073,188.99654 c 6.2228,-60.38318 -2.94631,-87.18397 -25.57942,-84.60884"
|
||||
id="path11677-3"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cc" />
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 13 KiB |
@@ -1,46 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='UTF-8'>
|
||||
<title>Yatta! API</title>
|
||||
<script src='javascript/application.js'></script>
|
||||
<script src='javascript/search.js'></script>
|
||||
<link rel='stylesheet' href='stylesheets/application.css' type='text/css'>
|
||||
</head>
|
||||
<body class='list'>
|
||||
<div class='list tree' id='content'>
|
||||
<h1 class='full_list_header'>File List</h1>
|
||||
<nav>
|
||||
<a target='_self' href='class_list.html'>
|
||||
Classes
|
||||
</a>
|
||||
<a target='_self' href='file_list.html'>
|
||||
Files
|
||||
</a>
|
||||
<a target='_self' href='method_list.html'>
|
||||
Methods
|
||||
</a>
|
||||
<a target='_self' href='extra_list.html'>
|
||||
Extras
|
||||
</a>
|
||||
</nav>
|
||||
<div id='search'>
|
||||
Search:
|
||||
<input type='text'>
|
||||
</div>
|
||||
<ul>
|
||||
<li>
|
||||
<a href='extra/README.md.html' target='main'>
|
||||
README.md
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href='extra/LICENSE.txt.html' target='main'>
|
||||
LICENSE.txt
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,174 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='UTF-8'>
|
||||
<title>Yatta! API</title>
|
||||
<script src='../../../javascript/application.js'></script>
|
||||
<script src='../../../javascript/search.js'></script>
|
||||
<link rel='stylesheet' href='../../../stylesheets/application.css' type='text/css'>
|
||||
</head>
|
||||
<body>
|
||||
<div id='base' data-path='../../../'></div>
|
||||
<div id='header'>
|
||||
<div id='menu'>
|
||||
<a href='../../../extra/README.md.html' title='Yatta!'>
|
||||
Yatta!
|
||||
</a>
|
||||
»
|
||||
<a href='../../../alphabetical_index.html' title='Index'>
|
||||
Index
|
||||
</a>
|
||||
»
|
||||
<span class='title'>lib</span>
|
||||
»
|
||||
<span class='title'>Connectors</span>
|
||||
»
|
||||
<span class='title'>Iwc-Connector.coffee</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id='content'>
|
||||
<h1>
|
||||
File:
|
||||
Iwc-Connector.coffee
|
||||
</h1>
|
||||
<table class='box'>
|
||||
<tr>
|
||||
<td>Defined in:</td>
|
||||
<td>lib/Connectors</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2>Variables Summary</h2>
|
||||
<dl class='constants'>
|
||||
<dt id='module.exports-variable'>
|
||||
module.exports
|
||||
=
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code class='coffeescript'>createIwcConnector</code></pre>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<h2>Method Summary</h2>
|
||||
<ul class='summary'>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#createIwcConnector-'>
|
||||
~
|
||||
(void)
|
||||
<b>createIwcConnector</b><span>(callback, options)</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
<h2>Method Details</h2>
|
||||
<div class='methods'>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='createIwcConnector-'>
|
||||
~
|
||||
(void)
|
||||
<b>createIwcConnector</b><span>(callback, options)</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='tags'>
|
||||
<h3>Parameters:</h3>
|
||||
<ul class='param'>
|
||||
<li>
|
||||
<span class='name'>callback</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>Function</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>The callback is called when the connector is initialized. </span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='name'>initial_user_id</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>String</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>Optional. You can set you own user_id (since the ids of duiclient are not always unique) </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
August 23, 14 21:34:25 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
2.0.9
|
||||
✲
|
||||
Press H to see the keyboard shortcuts
|
||||
✲
|
||||
<a href='http://twitter.com/netzpirat' target='_parent'>@netzpirat</a>
|
||||
✲
|
||||
<a href='http://twitter.com/_inossidabile' target='_parent'>@_inossidabile</a>
|
||||
</div>
|
||||
<iframe id='search_frame'></iframe>
|
||||
<div id='fuzzySearch'>
|
||||
<input type='text'>
|
||||
<ol></ol>
|
||||
</div>
|
||||
<div id='help'>
|
||||
<p>
|
||||
Quickly fuzzy find classes, mixins, methods, file:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>T</span>
|
||||
Open fuzzy finder dialog
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
Control the navigation frame:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>L</span>
|
||||
Toggle list view
|
||||
</li>
|
||||
<li>
|
||||
<span>C</span>
|
||||
Show class list
|
||||
</li>
|
||||
<li>
|
||||
<span>I</span>
|
||||
Show mixin list
|
||||
</li>
|
||||
<li>
|
||||
<span>F</span>
|
||||
Show file list
|
||||
</li>
|
||||
<li>
|
||||
<span>M</span>
|
||||
Show method list
|
||||
</li>
|
||||
<li>
|
||||
<span>E</span>
|
||||
Show extras list
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
You can focus and blur the search input:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>S</span>
|
||||
Focus search input
|
||||
</li>
|
||||
<li>
|
||||
<span>Esc</span>
|
||||
Blur search input
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,174 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='UTF-8'>
|
||||
<title>Yatta! API</title>
|
||||
<script src='../../../javascript/application.js'></script>
|
||||
<script src='../../../javascript/search.js'></script>
|
||||
<link rel='stylesheet' href='../../../stylesheets/application.css' type='text/css'>
|
||||
</head>
|
||||
<body>
|
||||
<div id='base' data-path='../../../'></div>
|
||||
<div id='header'>
|
||||
<div id='menu'>
|
||||
<a href='../../../extra/README.md.html' title='Yatta!'>
|
||||
Yatta!
|
||||
</a>
|
||||
»
|
||||
<a href='../../../alphabetical_index.html' title='Index'>
|
||||
Index
|
||||
</a>
|
||||
»
|
||||
<span class='title'>lib</span>
|
||||
»
|
||||
<span class='title'>Connectors</span>
|
||||
»
|
||||
<span class='title'>IwcConnector.coffee</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id='content'>
|
||||
<h1>
|
||||
File:
|
||||
IwcConnector.coffee
|
||||
</h1>
|
||||
<table class='box'>
|
||||
<tr>
|
||||
<td>Defined in:</td>
|
||||
<td>lib/Connectors</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2>Variables Summary</h2>
|
||||
<dl class='constants'>
|
||||
<dt id='module.exports-variable'>
|
||||
module.exports
|
||||
=
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code class='coffeescript'>createIwcConnector</code></pre>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<h2>Method Summary</h2>
|
||||
<ul class='summary'>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#createIwcConnector-'>
|
||||
~
|
||||
(void)
|
||||
<b>createIwcConnector</b><span>(callback, options)</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
<h2>Method Details</h2>
|
||||
<div class='methods'>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='createIwcConnector-'>
|
||||
~
|
||||
(void)
|
||||
<b>createIwcConnector</b><span>(callback, options)</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='tags'>
|
||||
<h3>Parameters:</h3>
|
||||
<ul class='param'>
|
||||
<li>
|
||||
<span class='name'>callback</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>Function</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>The callback is called when the connector is initialized. </span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='name'>initial_user_id</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>String</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>Optional. You can set you own user_id (since the ids of duiclient are not always unique) </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
August 24, 14 01:51:08 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
2.0.9
|
||||
✲
|
||||
Press H to see the keyboard shortcuts
|
||||
✲
|
||||
<a href='http://twitter.com/netzpirat' target='_parent'>@netzpirat</a>
|
||||
✲
|
||||
<a href='http://twitter.com/_inossidabile' target='_parent'>@_inossidabile</a>
|
||||
</div>
|
||||
<iframe id='search_frame'></iframe>
|
||||
<div id='fuzzySearch'>
|
||||
<input type='text'>
|
||||
<ol></ol>
|
||||
</div>
|
||||
<div id='help'>
|
||||
<p>
|
||||
Quickly fuzzy find classes, mixins, methods, file:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>T</span>
|
||||
Open fuzzy finder dialog
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
Control the navigation frame:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>L</span>
|
||||
Toggle list view
|
||||
</li>
|
||||
<li>
|
||||
<span>C</span>
|
||||
Show class list
|
||||
</li>
|
||||
<li>
|
||||
<span>I</span>
|
||||
Show mixin list
|
||||
</li>
|
||||
<li>
|
||||
<span>F</span>
|
||||
Show file list
|
||||
</li>
|
||||
<li>
|
||||
<span>M</span>
|
||||
Show method list
|
||||
</li>
|
||||
<li>
|
||||
<span>E</span>
|
||||
Show extras list
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
You can focus and blur the search input:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>S</span>
|
||||
Focus search input
|
||||
</li>
|
||||
<li>
|
||||
<span>Esc</span>
|
||||
Blur search input
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,232 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='UTF-8'>
|
||||
<title>Yatta! API</title>
|
||||
<script src='../../../javascript/application.js'></script>
|
||||
<script src='../../../javascript/search.js'></script>
|
||||
<link rel='stylesheet' href='../../../stylesheets/application.css' type='text/css'>
|
||||
</head>
|
||||
<body>
|
||||
<div id='base' data-path='../../../'></div>
|
||||
<div id='header'>
|
||||
<div id='menu'>
|
||||
<a href='../../../extra/README.md.html' title='Yatta!'>
|
||||
Yatta!
|
||||
</a>
|
||||
»
|
||||
<a href='../../../alphabetical_index.html' title='Index'>
|
||||
Index
|
||||
</a>
|
||||
»
|
||||
<span class='title'>lib</span>
|
||||
»
|
||||
<span class='title'>Connectors</span>
|
||||
»
|
||||
<span class='title'>PeerJs-Connector.coffee</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id='content'>
|
||||
<h1>
|
||||
File:
|
||||
PeerJs-Connector.coffee
|
||||
</h1>
|
||||
<table class='box'>
|
||||
<tr>
|
||||
<td>Defined in:</td>
|
||||
<td>lib/Connectors</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2>Variables Summary</h2>
|
||||
<dl class='constants'>
|
||||
<dt id='module.exports-variable'>
|
||||
module.exports
|
||||
=
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code class='coffeescript'>createPeerJsConnector</code></pre>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<h2>Method Summary</h2>
|
||||
<ul class='summary'>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#createPeerJsConnector-'>
|
||||
~
|
||||
(void)
|
||||
<b>createPeerJsConnector peerjs_options, callback</b><span>()</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
<h2>Method Details</h2>
|
||||
<div class='methods'>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='createPeerJsConnector-'>
|
||||
~
|
||||
(void)
|
||||
<b>createPeerJsConnector peerjs_options, callback</b><span>()</span>
|
||||
<br>
|
||||
~
|
||||
(void)
|
||||
<b>createPeerJsConnector peerjs_user_id, peerjs_options, callback</b><span>()</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='tags'>
|
||||
<div class='overloads'>
|
||||
<h3>Overloads:</h3>
|
||||
<div class='overload'>
|
||||
<p class='signature'>
|
||||
~
|
||||
(void)
|
||||
<b>createPeerJsConnector peerjs_options, callback</b><span>()</span>
|
||||
</p>
|
||||
<div class='tags'>
|
||||
<h3>Parameters:</h3>
|
||||
<ul class='param'>
|
||||
<li>
|
||||
<span class='name'>peerjs_options</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>Object</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>Is the options object that is passed to PeerJs. </span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='name'>callback</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>Function</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>The callback is called when the connector is initialized. </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='overload'>
|
||||
<p class='signature'>
|
||||
~
|
||||
(void)
|
||||
<b>createPeerJsConnector peerjs_user_id, peerjs_options, callback</b><span>()</span>
|
||||
</p>
|
||||
<div class='tags'>
|
||||
<h3>Parameters:</h3>
|
||||
<ul class='param'>
|
||||
<li>
|
||||
<span class='name'>peerjs_user_id</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>String</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>The user_id that is passed to PeerJs as the user_id and should be unique between all (also the unconnected) Peers. </span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='name'>peerjs_options</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>Object</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>Is the options object that is passed to PeerJs. </span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='name'>callback</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>Function</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>The callback is called when the connector is initialized. </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
August 23, 14 21:34:25 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
2.0.9
|
||||
✲
|
||||
Press H to see the keyboard shortcuts
|
||||
✲
|
||||
<a href='http://twitter.com/netzpirat' target='_parent'>@netzpirat</a>
|
||||
✲
|
||||
<a href='http://twitter.com/_inossidabile' target='_parent'>@_inossidabile</a>
|
||||
</div>
|
||||
<iframe id='search_frame'></iframe>
|
||||
<div id='fuzzySearch'>
|
||||
<input type='text'>
|
||||
<ol></ol>
|
||||
</div>
|
||||
<div id='help'>
|
||||
<p>
|
||||
Quickly fuzzy find classes, mixins, methods, file:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>T</span>
|
||||
Open fuzzy finder dialog
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
Control the navigation frame:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>L</span>
|
||||
Toggle list view
|
||||
</li>
|
||||
<li>
|
||||
<span>C</span>
|
||||
Show class list
|
||||
</li>
|
||||
<li>
|
||||
<span>I</span>
|
||||
Show mixin list
|
||||
</li>
|
||||
<li>
|
||||
<span>F</span>
|
||||
Show file list
|
||||
</li>
|
||||
<li>
|
||||
<span>M</span>
|
||||
Show method list
|
||||
</li>
|
||||
<li>
|
||||
<span>E</span>
|
||||
Show extras list
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
You can focus and blur the search input:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>S</span>
|
||||
Focus search input
|
||||
</li>
|
||||
<li>
|
||||
<span>Esc</span>
|
||||
Blur search input
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,232 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='UTF-8'>
|
||||
<title>Yatta! API</title>
|
||||
<script src='../../../javascript/application.js'></script>
|
||||
<script src='../../../javascript/search.js'></script>
|
||||
<link rel='stylesheet' href='../../../stylesheets/application.css' type='text/css'>
|
||||
</head>
|
||||
<body>
|
||||
<div id='base' data-path='../../../'></div>
|
||||
<div id='header'>
|
||||
<div id='menu'>
|
||||
<a href='../../../extra/README.md.html' title='Yatta!'>
|
||||
Yatta!
|
||||
</a>
|
||||
»
|
||||
<a href='../../../alphabetical_index.html' title='Index'>
|
||||
Index
|
||||
</a>
|
||||
»
|
||||
<span class='title'>lib</span>
|
||||
»
|
||||
<span class='title'>Connectors</span>
|
||||
»
|
||||
<span class='title'>PeerJsConnector.coffee</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id='content'>
|
||||
<h1>
|
||||
File:
|
||||
PeerJsConnector.coffee
|
||||
</h1>
|
||||
<table class='box'>
|
||||
<tr>
|
||||
<td>Defined in:</td>
|
||||
<td>lib/Connectors</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2>Variables Summary</h2>
|
||||
<dl class='constants'>
|
||||
<dt id='module.exports-variable'>
|
||||
module.exports
|
||||
=
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code class='coffeescript'>createPeerJsConnector</code></pre>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<h2>Method Summary</h2>
|
||||
<ul class='summary'>
|
||||
<li>
|
||||
<span class='signature'>
|
||||
<a href='#createPeerJsConnector-'>
|
||||
~
|
||||
(void)
|
||||
<b>createPeerJsConnector peerjs_options, callback</b><span>()</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class='desc'>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
<h2>Method Details</h2>
|
||||
<div class='methods'>
|
||||
<div class='method_details'>
|
||||
<p class='signature' id='createPeerJsConnector-'>
|
||||
~
|
||||
(void)
|
||||
<b>createPeerJsConnector peerjs_options, callback</b><span>()</span>
|
||||
<br>
|
||||
~
|
||||
(void)
|
||||
<b>createPeerJsConnector peerjs_user_id, peerjs_options, callback</b><span>()</span>
|
||||
<br>
|
||||
</p>
|
||||
<div class='tags'>
|
||||
<div class='overloads'>
|
||||
<h3>Overloads:</h3>
|
||||
<div class='overload'>
|
||||
<p class='signature'>
|
||||
~
|
||||
(void)
|
||||
<b>createPeerJsConnector peerjs_options, callback</b><span>()</span>
|
||||
</p>
|
||||
<div class='tags'>
|
||||
<h3>Parameters:</h3>
|
||||
<ul class='param'>
|
||||
<li>
|
||||
<span class='name'>peerjs_options</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>Object</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>Is the options object that is passed to PeerJs. </span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='name'>callback</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>Function</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>The callback is called when the connector is initialized. </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class='overload'>
|
||||
<p class='signature'>
|
||||
~
|
||||
(void)
|
||||
<b>createPeerJsConnector peerjs_user_id, peerjs_options, callback</b><span>()</span>
|
||||
</p>
|
||||
<div class='tags'>
|
||||
<h3>Parameters:</h3>
|
||||
<ul class='param'>
|
||||
<li>
|
||||
<span class='name'>peerjs_user_id</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>String</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>The user_id that is passed to PeerJs as the user_id and should be unique between all (also the unconnected) Peers. </span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='name'>peerjs_options</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>Object</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>Is the options object that is passed to PeerJs. </span>
|
||||
</li>
|
||||
<li>
|
||||
<span class='name'>callback</span>
|
||||
<span class='type'>
|
||||
(
|
||||
<tt>Function</tt>
|
||||
)
|
||||
</span>
|
||||
—
|
||||
<span class='desc'>The callback is called when the connector is initialized. </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
August 24, 14 01:51:08 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
2.0.9
|
||||
✲
|
||||
Press H to see the keyboard shortcuts
|
||||
✲
|
||||
<a href='http://twitter.com/netzpirat' target='_parent'>@netzpirat</a>
|
||||
✲
|
||||
<a href='http://twitter.com/_inossidabile' target='_parent'>@_inossidabile</a>
|
||||
</div>
|
||||
<iframe id='search_frame'></iframe>
|
||||
<div id='fuzzySearch'>
|
||||
<input type='text'>
|
||||
<ol></ol>
|
||||
</div>
|
||||
<div id='help'>
|
||||
<p>
|
||||
Quickly fuzzy find classes, mixins, methods, file:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>T</span>
|
||||
Open fuzzy finder dialog
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
Control the navigation frame:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>L</span>
|
||||
Toggle list view
|
||||
</li>
|
||||
<li>
|
||||
<span>C</span>
|
||||
Show class list
|
||||
</li>
|
||||
<li>
|
||||
<span>I</span>
|
||||
Show mixin list
|
||||
</li>
|
||||
<li>
|
||||
<span>F</span>
|
||||
Show file list
|
||||
</li>
|
||||
<li>
|
||||
<span>M</span>
|
||||
Show method list
|
||||
</li>
|
||||
<li>
|
||||
<span>E</span>
|
||||
Show extras list
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
You can focus and blur the search input:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>S</span>
|
||||
Focus search input
|
||||
</li>
|
||||
<li>
|
||||
<span>Esc</span>
|
||||
Blur search input
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,113 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='UTF-8'>
|
||||
<title>Yatta! API</title>
|
||||
<script src='../../../javascript/application.js'></script>
|
||||
<script src='../../../javascript/search.js'></script>
|
||||
<link rel='stylesheet' href='../../../stylesheets/application.css' type='text/css'>
|
||||
</head>
|
||||
<body>
|
||||
<div id='base' data-path='../../../'></div>
|
||||
<div id='header'>
|
||||
<div id='menu'>
|
||||
<a href='../../../extra/README.md.html' title='Yatta!'>
|
||||
Yatta!
|
||||
</a>
|
||||
»
|
||||
<a href='../../../alphabetical_index.html' title='Index'>
|
||||
Index
|
||||
</a>
|
||||
»
|
||||
<span class='title'>lib</span>
|
||||
»
|
||||
<span class='title'>Connectors</span>
|
||||
»
|
||||
<span class='title'>Test-Connector.coffee</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id='content'>
|
||||
<h1>
|
||||
File:
|
||||
Test-Connector.coffee
|
||||
</h1>
|
||||
<table class='box'>
|
||||
<tr>
|
||||
<td>Defined in:</td>
|
||||
<td>lib/Connectors</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
August 23, 14 21:34:25 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
2.0.9
|
||||
✲
|
||||
Press H to see the keyboard shortcuts
|
||||
✲
|
||||
<a href='http://twitter.com/netzpirat' target='_parent'>@netzpirat</a>
|
||||
✲
|
||||
<a href='http://twitter.com/_inossidabile' target='_parent'>@_inossidabile</a>
|
||||
</div>
|
||||
<iframe id='search_frame'></iframe>
|
||||
<div id='fuzzySearch'>
|
||||
<input type='text'>
|
||||
<ol></ol>
|
||||
</div>
|
||||
<div id='help'>
|
||||
<p>
|
||||
Quickly fuzzy find classes, mixins, methods, file:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>T</span>
|
||||
Open fuzzy finder dialog
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
Control the navigation frame:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>L</span>
|
||||
Toggle list view
|
||||
</li>
|
||||
<li>
|
||||
<span>C</span>
|
||||
Show class list
|
||||
</li>
|
||||
<li>
|
||||
<span>I</span>
|
||||
Show mixin list
|
||||
</li>
|
||||
<li>
|
||||
<span>F</span>
|
||||
Show file list
|
||||
</li>
|
||||
<li>
|
||||
<span>M</span>
|
||||
Show method list
|
||||
</li>
|
||||
<li>
|
||||
<span>E</span>
|
||||
Show extras list
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
You can focus and blur the search input:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>S</span>
|
||||
Focus search input
|
||||
</li>
|
||||
<li>
|
||||
<span>Esc</span>
|
||||
Blur search input
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,113 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='UTF-8'>
|
||||
<title>Yatta! API</title>
|
||||
<script src='../../../javascript/application.js'></script>
|
||||
<script src='../../../javascript/search.js'></script>
|
||||
<link rel='stylesheet' href='../../../stylesheets/application.css' type='text/css'>
|
||||
</head>
|
||||
<body>
|
||||
<div id='base' data-path='../../../'></div>
|
||||
<div id='header'>
|
||||
<div id='menu'>
|
||||
<a href='../../../extra/README.md.html' title='Yatta!'>
|
||||
Yatta!
|
||||
</a>
|
||||
»
|
||||
<a href='../../../alphabetical_index.html' title='Index'>
|
||||
Index
|
||||
</a>
|
||||
»
|
||||
<span class='title'>lib</span>
|
||||
»
|
||||
<span class='title'>Connectors</span>
|
||||
»
|
||||
<span class='title'>TestConnector.coffee</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id='content'>
|
||||
<h1>
|
||||
File:
|
||||
TestConnector.coffee
|
||||
</h1>
|
||||
<table class='box'>
|
||||
<tr>
|
||||
<td>Defined in:</td>
|
||||
<td>lib/Connectors</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
August 24, 14 01:51:08 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
2.0.9
|
||||
✲
|
||||
Press H to see the keyboard shortcuts
|
||||
✲
|
||||
<a href='http://twitter.com/netzpirat' target='_parent'>@netzpirat</a>
|
||||
✲
|
||||
<a href='http://twitter.com/_inossidabile' target='_parent'>@_inossidabile</a>
|
||||
</div>
|
||||
<iframe id='search_frame'></iframe>
|
||||
<div id='fuzzySearch'>
|
||||
<input type='text'>
|
||||
<ol></ol>
|
||||
</div>
|
||||
<div id='help'>
|
||||
<p>
|
||||
Quickly fuzzy find classes, mixins, methods, file:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>T</span>
|
||||
Open fuzzy finder dialog
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
Control the navigation frame:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>L</span>
|
||||
Toggle list view
|
||||
</li>
|
||||
<li>
|
||||
<span>C</span>
|
||||
Show class list
|
||||
</li>
|
||||
<li>
|
||||
<span>I</span>
|
||||
Show mixin list
|
||||
</li>
|
||||
<li>
|
||||
<span>F</span>
|
||||
Show file list
|
||||
</li>
|
||||
<li>
|
||||
<span>M</span>
|
||||
Show method list
|
||||
</li>
|
||||
<li>
|
||||
<span>E</span>
|
||||
Show extras list
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
You can focus and blur the search input:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>S</span>
|
||||
Focus search input
|
||||
</li>
|
||||
<li>
|
||||
<span>Esc</span>
|
||||
Blur search input
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,122 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='UTF-8'>
|
||||
<title>Yatta! API</title>
|
||||
<script src='../../javascript/application.js'></script>
|
||||
<script src='../../javascript/search.js'></script>
|
||||
<link rel='stylesheet' href='../../stylesheets/application.css' type='text/css'>
|
||||
</head>
|
||||
<body>
|
||||
<div id='base' data-path='../../'></div>
|
||||
<div id='header'>
|
||||
<div id='menu'>
|
||||
<a href='../../extra/README.md.html' title='Yatta!'>
|
||||
Yatta!
|
||||
</a>
|
||||
»
|
||||
<a href='../../alphabetical_index.html' title='Index'>
|
||||
Index
|
||||
</a>
|
||||
»
|
||||
<span class='title'>lib</span>
|
||||
»
|
||||
<span class='title'>Engine.coffee</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id='content'>
|
||||
<h1>
|
||||
File:
|
||||
Engine.coffee
|
||||
</h1>
|
||||
<table class='box'>
|
||||
<tr>
|
||||
<td>Defined in:</td>
|
||||
<td>lib</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2>Variables Summary</h2>
|
||||
<dl class='constants'>
|
||||
<dt id='module.exports-variable'>
|
||||
module.exports
|
||||
=
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code class='coffeescript'>Engine</code></pre>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
August 24, 14 01:51:08 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
2.0.9
|
||||
✲
|
||||
Press H to see the keyboard shortcuts
|
||||
✲
|
||||
<a href='http://twitter.com/netzpirat' target='_parent'>@netzpirat</a>
|
||||
✲
|
||||
<a href='http://twitter.com/_inossidabile' target='_parent'>@_inossidabile</a>
|
||||
</div>
|
||||
<iframe id='search_frame'></iframe>
|
||||
<div id='fuzzySearch'>
|
||||
<input type='text'>
|
||||
<ol></ol>
|
||||
</div>
|
||||
<div id='help'>
|
||||
<p>
|
||||
Quickly fuzzy find classes, mixins, methods, file:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>T</span>
|
||||
Open fuzzy finder dialog
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
Control the navigation frame:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>L</span>
|
||||
Toggle list view
|
||||
</li>
|
||||
<li>
|
||||
<span>C</span>
|
||||
Show class list
|
||||
</li>
|
||||
<li>
|
||||
<span>I</span>
|
||||
Show mixin list
|
||||
</li>
|
||||
<li>
|
||||
<span>F</span>
|
||||
Show file list
|
||||
</li>
|
||||
<li>
|
||||
<span>M</span>
|
||||
Show method list
|
||||
</li>
|
||||
<li>
|
||||
<span>E</span>
|
||||
Show extras list
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
You can focus and blur the search input:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>S</span>
|
||||
Focus search input
|
||||
</li>
|
||||
<li>
|
||||
<span>Esc</span>
|
||||
Blur search input
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,134 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='UTF-8'>
|
||||
<title>Yatta! API</title>
|
||||
<script src='../../../javascript/application.js'></script>
|
||||
<script src='../../../javascript/search.js'></script>
|
||||
<link rel='stylesheet' href='../../../stylesheets/application.css' type='text/css'>
|
||||
</head>
|
||||
<body>
|
||||
<div id='base' data-path='../../../'></div>
|
||||
<div id='header'>
|
||||
<div id='menu'>
|
||||
<a href='../../../extra/README.md.html' title='Yatta!'>
|
||||
Yatta!
|
||||
</a>
|
||||
»
|
||||
<a href='../../../alphabetical_index.html' title='Index'>
|
||||
Index
|
||||
</a>
|
||||
»
|
||||
<span class='title'>lib</span>
|
||||
»
|
||||
<span class='title'>Frameworks</span>
|
||||
»
|
||||
<span class='title'>JsonFramework.coffee</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id='content'>
|
||||
<h1>
|
||||
File:
|
||||
JsonFramework.coffee
|
||||
</h1>
|
||||
<table class='box'>
|
||||
<tr>
|
||||
<td>Defined in:</td>
|
||||
<td>lib/Frameworks</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
Classes:
|
||||
</td>
|
||||
<td>
|
||||
<a href='../../../class/JsonFramework.html'>
|
||||
JsonFramework
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2>Variables Summary</h2>
|
||||
<dl class='constants'>
|
||||
<dt id='module.exports-variable'>
|
||||
module.exports
|
||||
=
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code class='coffeescript'>JsonFramework</code></pre>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
August 24, 14 01:51:08 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
2.0.9
|
||||
✲
|
||||
Press H to see the keyboard shortcuts
|
||||
✲
|
||||
<a href='http://twitter.com/netzpirat' target='_parent'>@netzpirat</a>
|
||||
✲
|
||||
<a href='http://twitter.com/_inossidabile' target='_parent'>@_inossidabile</a>
|
||||
</div>
|
||||
<iframe id='search_frame'></iframe>
|
||||
<div id='fuzzySearch'>
|
||||
<input type='text'>
|
||||
<ol></ol>
|
||||
</div>
|
||||
<div id='help'>
|
||||
<p>
|
||||
Quickly fuzzy find classes, mixins, methods, file:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>T</span>
|
||||
Open fuzzy finder dialog
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
Control the navigation frame:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>L</span>
|
||||
Toggle list view
|
||||
</li>
|
||||
<li>
|
||||
<span>C</span>
|
||||
Show class list
|
||||
</li>
|
||||
<li>
|
||||
<span>I</span>
|
||||
Show mixin list
|
||||
</li>
|
||||
<li>
|
||||
<span>F</span>
|
||||
Show file list
|
||||
</li>
|
||||
<li>
|
||||
<span>M</span>
|
||||
Show method list
|
||||
</li>
|
||||
<li>
|
||||
<span>E</span>
|
||||
Show extras list
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
You can focus and blur the search input:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>S</span>
|
||||
Focus search input
|
||||
</li>
|
||||
<li>
|
||||
<span>Esc</span>
|
||||
Blur search input
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,134 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='UTF-8'>
|
||||
<title>Yatta! API</title>
|
||||
<script src='../../../javascript/application.js'></script>
|
||||
<script src='../../../javascript/search.js'></script>
|
||||
<link rel='stylesheet' href='../../../stylesheets/application.css' type='text/css'>
|
||||
</head>
|
||||
<body>
|
||||
<div id='base' data-path='../../../'></div>
|
||||
<div id='header'>
|
||||
<div id='menu'>
|
||||
<a href='../../../extra/README.md.html' title='Yatta!'>
|
||||
Yatta!
|
||||
</a>
|
||||
»
|
||||
<a href='../../../alphabetical_index.html' title='Index'>
|
||||
Index
|
||||
</a>
|
||||
»
|
||||
<span class='title'>lib</span>
|
||||
»
|
||||
<span class='title'>Frameworks</span>
|
||||
»
|
||||
<span class='title'>JsonYatta.coffee</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id='content'>
|
||||
<h1>
|
||||
File:
|
||||
JsonYatta.coffee
|
||||
</h1>
|
||||
<table class='box'>
|
||||
<tr>
|
||||
<td>Defined in:</td>
|
||||
<td>lib/Frameworks</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
Classes:
|
||||
</td>
|
||||
<td>
|
||||
<a href='../../../class/JsonYatta.html'>
|
||||
JsonYatta
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2>Variables Summary</h2>
|
||||
<dl class='constants'>
|
||||
<dt id='module.exports-variable'>
|
||||
module.exports
|
||||
=
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code class='coffeescript'>JsonYatta</code></pre>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
August 23, 14 21:18:25 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
2.0.9
|
||||
✲
|
||||
Press H to see the keyboard shortcuts
|
||||
✲
|
||||
<a href='http://twitter.com/netzpirat' target='_parent'>@netzpirat</a>
|
||||
✲
|
||||
<a href='http://twitter.com/_inossidabile' target='_parent'>@_inossidabile</a>
|
||||
</div>
|
||||
<iframe id='search_frame'></iframe>
|
||||
<div id='fuzzySearch'>
|
||||
<input type='text'>
|
||||
<ol></ol>
|
||||
</div>
|
||||
<div id='help'>
|
||||
<p>
|
||||
Quickly fuzzy find classes, mixins, methods, file:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>T</span>
|
||||
Open fuzzy finder dialog
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
Control the navigation frame:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>L</span>
|
||||
Toggle list view
|
||||
</li>
|
||||
<li>
|
||||
<span>C</span>
|
||||
Show class list
|
||||
</li>
|
||||
<li>
|
||||
<span>I</span>
|
||||
Show mixin list
|
||||
</li>
|
||||
<li>
|
||||
<span>F</span>
|
||||
Show file list
|
||||
</li>
|
||||
<li>
|
||||
<span>M</span>
|
||||
Show method list
|
||||
</li>
|
||||
<li>
|
||||
<span>E</span>
|
||||
Show extras list
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
You can focus and blur the search input:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>S</span>
|
||||
Focus search input
|
||||
</li>
|
||||
<li>
|
||||
<span>Esc</span>
|
||||
Blur search input
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,134 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='UTF-8'>
|
||||
<title>Yatta! API</title>
|
||||
<script src='../../../javascript/application.js'></script>
|
||||
<script src='../../../javascript/search.js'></script>
|
||||
<link rel='stylesheet' href='../../../stylesheets/application.css' type='text/css'>
|
||||
</head>
|
||||
<body>
|
||||
<div id='base' data-path='../../../'></div>
|
||||
<div id='header'>
|
||||
<div id='menu'>
|
||||
<a href='../../../extra/README.md.html' title='Yatta!'>
|
||||
Yatta!
|
||||
</a>
|
||||
»
|
||||
<a href='../../../alphabetical_index.html' title='Index'>
|
||||
Index
|
||||
</a>
|
||||
»
|
||||
<span class='title'>lib</span>
|
||||
»
|
||||
<span class='title'>Frameworks</span>
|
||||
»
|
||||
<span class='title'>TextFramework.coffee</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id='content'>
|
||||
<h1>
|
||||
File:
|
||||
TextFramework.coffee
|
||||
</h1>
|
||||
<table class='box'>
|
||||
<tr>
|
||||
<td>Defined in:</td>
|
||||
<td>lib/Frameworks</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
Classes:
|
||||
</td>
|
||||
<td>
|
||||
<a href='../../../class/TextFramework.html'>
|
||||
TextFramework
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2>Variables Summary</h2>
|
||||
<dl class='constants'>
|
||||
<dt id='module.exports-variable'>
|
||||
module.exports
|
||||
=
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code class='coffeescript'>TextFramework</code></pre>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
August 24, 14 01:51:08 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
2.0.9
|
||||
✲
|
||||
Press H to see the keyboard shortcuts
|
||||
✲
|
||||
<a href='http://twitter.com/netzpirat' target='_parent'>@netzpirat</a>
|
||||
✲
|
||||
<a href='http://twitter.com/_inossidabile' target='_parent'>@_inossidabile</a>
|
||||
</div>
|
||||
<iframe id='search_frame'></iframe>
|
||||
<div id='fuzzySearch'>
|
||||
<input type='text'>
|
||||
<ol></ol>
|
||||
</div>
|
||||
<div id='help'>
|
||||
<p>
|
||||
Quickly fuzzy find classes, mixins, methods, file:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>T</span>
|
||||
Open fuzzy finder dialog
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
Control the navigation frame:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>L</span>
|
||||
Toggle list view
|
||||
</li>
|
||||
<li>
|
||||
<span>C</span>
|
||||
Show class list
|
||||
</li>
|
||||
<li>
|
||||
<span>I</span>
|
||||
Show mixin list
|
||||
</li>
|
||||
<li>
|
||||
<span>F</span>
|
||||
Show file list
|
||||
</li>
|
||||
<li>
|
||||
<span>M</span>
|
||||
Show method list
|
||||
</li>
|
||||
<li>
|
||||
<span>E</span>
|
||||
Show extras list
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
You can focus and blur the search input:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>S</span>
|
||||
Focus search input
|
||||
</li>
|
||||
<li>
|
||||
<span>Esc</span>
|
||||
Blur search input
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,134 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='UTF-8'>
|
||||
<title>Yatta! API</title>
|
||||
<script src='../../../javascript/application.js'></script>
|
||||
<script src='../../../javascript/search.js'></script>
|
||||
<link rel='stylesheet' href='../../../stylesheets/application.css' type='text/css'>
|
||||
</head>
|
||||
<body>
|
||||
<div id='base' data-path='../../../'></div>
|
||||
<div id='header'>
|
||||
<div id='menu'>
|
||||
<a href='../../../extra/README.md.html' title='Yatta!'>
|
||||
Yatta!
|
||||
</a>
|
||||
»
|
||||
<a href='../../../alphabetical_index.html' title='Index'>
|
||||
Index
|
||||
</a>
|
||||
»
|
||||
<span class='title'>lib</span>
|
||||
»
|
||||
<span class='title'>Frameworks</span>
|
||||
»
|
||||
<span class='title'>TextYatta.coffee</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id='content'>
|
||||
<h1>
|
||||
File:
|
||||
TextYatta.coffee
|
||||
</h1>
|
||||
<table class='box'>
|
||||
<tr>
|
||||
<td>Defined in:</td>
|
||||
<td>lib/Frameworks</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
Classes:
|
||||
</td>
|
||||
<td>
|
||||
<a href='../../../class/TextYatta.html'>
|
||||
TextYatta
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2>Variables Summary</h2>
|
||||
<dl class='constants'>
|
||||
<dt id='module.exports-variable'>
|
||||
module.exports
|
||||
=
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code class='coffeescript'>TextYatta</code></pre>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
August 23, 14 21:18:25 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
2.0.9
|
||||
✲
|
||||
Press H to see the keyboard shortcuts
|
||||
✲
|
||||
<a href='http://twitter.com/netzpirat' target='_parent'>@netzpirat</a>
|
||||
✲
|
||||
<a href='http://twitter.com/_inossidabile' target='_parent'>@_inossidabile</a>
|
||||
</div>
|
||||
<iframe id='search_frame'></iframe>
|
||||
<div id='fuzzySearch'>
|
||||
<input type='text'>
|
||||
<ol></ol>
|
||||
</div>
|
||||
<div id='help'>
|
||||
<p>
|
||||
Quickly fuzzy find classes, mixins, methods, file:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>T</span>
|
||||
Open fuzzy finder dialog
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
Control the navigation frame:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>L</span>
|
||||
Toggle list view
|
||||
</li>
|
||||
<li>
|
||||
<span>C</span>
|
||||
Show class list
|
||||
</li>
|
||||
<li>
|
||||
<span>I</span>
|
||||
Show mixin list
|
||||
</li>
|
||||
<li>
|
||||
<span>F</span>
|
||||
Show file list
|
||||
</li>
|
||||
<li>
|
||||
<span>M</span>
|
||||
Show method list
|
||||
</li>
|
||||
<li>
|
||||
<span>E</span>
|
||||
Show extras list
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
You can focus and blur the search input:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>S</span>
|
||||
Focus search input
|
||||
</li>
|
||||
<li>
|
||||
<span>Esc</span>
|
||||
Blur search input
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,122 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='UTF-8'>
|
||||
<title>Yatta! API</title>
|
||||
<script src='../../javascript/application.js'></script>
|
||||
<script src='../../javascript/search.js'></script>
|
||||
<link rel='stylesheet' href='../../stylesheets/application.css' type='text/css'>
|
||||
</head>
|
||||
<body>
|
||||
<div id='base' data-path='../../'></div>
|
||||
<div id='header'>
|
||||
<div id='menu'>
|
||||
<a href='../../extra/README.md.html' title='Yatta!'>
|
||||
Yatta!
|
||||
</a>
|
||||
»
|
||||
<a href='../../alphabetical_index.html' title='Index'>
|
||||
Index
|
||||
</a>
|
||||
»
|
||||
<span class='title'>lib</span>
|
||||
»
|
||||
<span class='title'>HistoryBuffer.coffee</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id='content'>
|
||||
<h1>
|
||||
File:
|
||||
HistoryBuffer.coffee
|
||||
</h1>
|
||||
<table class='box'>
|
||||
<tr>
|
||||
<td>Defined in:</td>
|
||||
<td>lib</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h2>Variables Summary</h2>
|
||||
<dl class='constants'>
|
||||
<dt id='module.exports-variable'>
|
||||
module.exports
|
||||
=
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code class='coffeescript'>HistoryBuffer</code></pre>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
August 24, 14 01:51:08 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
2.0.9
|
||||
✲
|
||||
Press H to see the keyboard shortcuts
|
||||
✲
|
||||
<a href='http://twitter.com/netzpirat' target='_parent'>@netzpirat</a>
|
||||
✲
|
||||
<a href='http://twitter.com/_inossidabile' target='_parent'>@_inossidabile</a>
|
||||
</div>
|
||||
<iframe id='search_frame'></iframe>
|
||||
<div id='fuzzySearch'>
|
||||
<input type='text'>
|
||||
<ol></ol>
|
||||
</div>
|
||||
<div id='help'>
|
||||
<p>
|
||||
Quickly fuzzy find classes, mixins, methods, file:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>T</span>
|
||||
Open fuzzy finder dialog
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
Control the navigation frame:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>L</span>
|
||||
Toggle list view
|
||||
</li>
|
||||
<li>
|
||||
<span>C</span>
|
||||
Show class list
|
||||
</li>
|
||||
<li>
|
||||
<span>I</span>
|
||||
Show mixin list
|
||||
</li>
|
||||
<li>
|
||||
<span>F</span>
|
||||
Show file list
|
||||
</li>
|
||||
<li>
|
||||
<span>M</span>
|
||||
Show method list
|
||||
</li>
|
||||
<li>
|
||||
<span>E</span>
|
||||
Show extras list
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
You can focus and blur the search input:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>S</span>
|
||||
Focus search input
|
||||
</li>
|
||||
<li>
|
||||
<span>Esc</span>
|
||||
Blur search input
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,113 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='UTF-8'>
|
||||
<title>Yatta! API</title>
|
||||
<script src='../../../javascript/application.js'></script>
|
||||
<script src='../../../javascript/search.js'></script>
|
||||
<link rel='stylesheet' href='../../../stylesheets/application.css' type='text/css'>
|
||||
</head>
|
||||
<body>
|
||||
<div id='base' data-path='../../../'></div>
|
||||
<div id='header'>
|
||||
<div id='menu'>
|
||||
<a href='../../../extra/README.md.html' title='Yatta!'>
|
||||
Yatta!
|
||||
</a>
|
||||
»
|
||||
<a href='../../../alphabetical_index.html' title='Index'>
|
||||
Index
|
||||
</a>
|
||||
»
|
||||
<span class='title'>lib</span>
|
||||
»
|
||||
<span class='title'>Types</span>
|
||||
»
|
||||
<span class='title'>BasicTypes.coffee</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id='content'>
|
||||
<h1>
|
||||
File:
|
||||
BasicTypes.coffee
|
||||
</h1>
|
||||
<table class='box'>
|
||||
<tr>
|
||||
<td>Defined in:</td>
|
||||
<td>lib/Types</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
August 24, 14 01:51:08 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
2.0.9
|
||||
✲
|
||||
Press H to see the keyboard shortcuts
|
||||
✲
|
||||
<a href='http://twitter.com/netzpirat' target='_parent'>@netzpirat</a>
|
||||
✲
|
||||
<a href='http://twitter.com/_inossidabile' target='_parent'>@_inossidabile</a>
|
||||
</div>
|
||||
<iframe id='search_frame'></iframe>
|
||||
<div id='fuzzySearch'>
|
||||
<input type='text'>
|
||||
<ol></ol>
|
||||
</div>
|
||||
<div id='help'>
|
||||
<p>
|
||||
Quickly fuzzy find classes, mixins, methods, file:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>T</span>
|
||||
Open fuzzy finder dialog
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
Control the navigation frame:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>L</span>
|
||||
Toggle list view
|
||||
</li>
|
||||
<li>
|
||||
<span>C</span>
|
||||
Show class list
|
||||
</li>
|
||||
<li>
|
||||
<span>I</span>
|
||||
Show mixin list
|
||||
</li>
|
||||
<li>
|
||||
<span>F</span>
|
||||
Show file list
|
||||
</li>
|
||||
<li>
|
||||
<span>M</span>
|
||||
Show method list
|
||||
</li>
|
||||
<li>
|
||||
<span>E</span>
|
||||
Show extras list
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
You can focus and blur the search input:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>S</span>
|
||||
Focus search input
|
||||
</li>
|
||||
<li>
|
||||
<span>Esc</span>
|
||||
Blur search input
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,113 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='UTF-8'>
|
||||
<title>Yatta! API</title>
|
||||
<script src='../../../javascript/application.js'></script>
|
||||
<script src='../../../javascript/search.js'></script>
|
||||
<link rel='stylesheet' href='../../../stylesheets/application.css' type='text/css'>
|
||||
</head>
|
||||
<body>
|
||||
<div id='base' data-path='../../../'></div>
|
||||
<div id='header'>
|
||||
<div id='menu'>
|
||||
<a href='../../../extra/README.md.html' title='Yatta!'>
|
||||
Yatta!
|
||||
</a>
|
||||
»
|
||||
<a href='../../../alphabetical_index.html' title='Index'>
|
||||
Index
|
||||
</a>
|
||||
»
|
||||
<span class='title'>lib</span>
|
||||
»
|
||||
<span class='title'>Types</span>
|
||||
»
|
||||
<span class='title'>JsonTypes.coffee</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id='content'>
|
||||
<h1>
|
||||
File:
|
||||
JsonTypes.coffee
|
||||
</h1>
|
||||
<table class='box'>
|
||||
<tr>
|
||||
<td>Defined in:</td>
|
||||
<td>lib/Types</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
August 24, 14 01:51:08 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
2.0.9
|
||||
✲
|
||||
Press H to see the keyboard shortcuts
|
||||
✲
|
||||
<a href='http://twitter.com/netzpirat' target='_parent'>@netzpirat</a>
|
||||
✲
|
||||
<a href='http://twitter.com/_inossidabile' target='_parent'>@_inossidabile</a>
|
||||
</div>
|
||||
<iframe id='search_frame'></iframe>
|
||||
<div id='fuzzySearch'>
|
||||
<input type='text'>
|
||||
<ol></ol>
|
||||
</div>
|
||||
<div id='help'>
|
||||
<p>
|
||||
Quickly fuzzy find classes, mixins, methods, file:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>T</span>
|
||||
Open fuzzy finder dialog
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
Control the navigation frame:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>L</span>
|
||||
Toggle list view
|
||||
</li>
|
||||
<li>
|
||||
<span>C</span>
|
||||
Show class list
|
||||
</li>
|
||||
<li>
|
||||
<span>I</span>
|
||||
Show mixin list
|
||||
</li>
|
||||
<li>
|
||||
<span>F</span>
|
||||
Show file list
|
||||
</li>
|
||||
<li>
|
||||
<span>M</span>
|
||||
Show method list
|
||||
</li>
|
||||
<li>
|
||||
<span>E</span>
|
||||
Show extras list
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
You can focus and blur the search input:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>S</span>
|
||||
Focus search input
|
||||
</li>
|
||||
<li>
|
||||
<span>Esc</span>
|
||||
Blur search input
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,113 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='UTF-8'>
|
||||
<title>Yatta! API</title>
|
||||
<script src='../../../javascript/application.js'></script>
|
||||
<script src='../../../javascript/search.js'></script>
|
||||
<link rel='stylesheet' href='../../../stylesheets/application.css' type='text/css'>
|
||||
</head>
|
||||
<body>
|
||||
<div id='base' data-path='../../../'></div>
|
||||
<div id='header'>
|
||||
<div id='menu'>
|
||||
<a href='../../../extra/README.md.html' title='Yatta!'>
|
||||
Yatta!
|
||||
</a>
|
||||
»
|
||||
<a href='../../../alphabetical_index.html' title='Index'>
|
||||
Index
|
||||
</a>
|
||||
»
|
||||
<span class='title'>lib</span>
|
||||
»
|
||||
<span class='title'>Types</span>
|
||||
»
|
||||
<span class='title'>StructuredTypes.coffee</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id='content'>
|
||||
<h1>
|
||||
File:
|
||||
StructuredTypes.coffee
|
||||
</h1>
|
||||
<table class='box'>
|
||||
<tr>
|
||||
<td>Defined in:</td>
|
||||
<td>lib/Types</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
August 24, 14 01:51:08 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
2.0.9
|
||||
✲
|
||||
Press H to see the keyboard shortcuts
|
||||
✲
|
||||
<a href='http://twitter.com/netzpirat' target='_parent'>@netzpirat</a>
|
||||
✲
|
||||
<a href='http://twitter.com/_inossidabile' target='_parent'>@_inossidabile</a>
|
||||
</div>
|
||||
<iframe id='search_frame'></iframe>
|
||||
<div id='fuzzySearch'>
|
||||
<input type='text'>
|
||||
<ol></ol>
|
||||
</div>
|
||||
<div id='help'>
|
||||
<p>
|
||||
Quickly fuzzy find classes, mixins, methods, file:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>T</span>
|
||||
Open fuzzy finder dialog
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
Control the navigation frame:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>L</span>
|
||||
Toggle list view
|
||||
</li>
|
||||
<li>
|
||||
<span>C</span>
|
||||
Show class list
|
||||
</li>
|
||||
<li>
|
||||
<span>I</span>
|
||||
Show mixin list
|
||||
</li>
|
||||
<li>
|
||||
<span>F</span>
|
||||
Show file list
|
||||
</li>
|
||||
<li>
|
||||
<span>M</span>
|
||||
Show method list
|
||||
</li>
|
||||
<li>
|
||||
<span>E</span>
|
||||
Show extras list
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
You can focus and blur the search input:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>S</span>
|
||||
Focus search input
|
||||
</li>
|
||||
<li>
|
||||
<span>Esc</span>
|
||||
Blur search input
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,113 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='UTF-8'>
|
||||
<title>Yatta! API</title>
|
||||
<script src='../../../javascript/application.js'></script>
|
||||
<script src='../../../javascript/search.js'></script>
|
||||
<link rel='stylesheet' href='../../../stylesheets/application.css' type='text/css'>
|
||||
</head>
|
||||
<body>
|
||||
<div id='base' data-path='../../../'></div>
|
||||
<div id='header'>
|
||||
<div id='menu'>
|
||||
<a href='../../../extra/README.md.html' title='Yatta!'>
|
||||
Yatta!
|
||||
</a>
|
||||
»
|
||||
<a href='../../../alphabetical_index.html' title='Index'>
|
||||
Index
|
||||
</a>
|
||||
»
|
||||
<span class='title'>lib</span>
|
||||
»
|
||||
<span class='title'>Types</span>
|
||||
»
|
||||
<span class='title'>TextTypes.coffee</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id='content'>
|
||||
<h1>
|
||||
File:
|
||||
TextTypes.coffee
|
||||
</h1>
|
||||
<table class='box'>
|
||||
<tr>
|
||||
<td>Defined in:</td>
|
||||
<td>lib/Types</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
August 24, 14 01:51:08 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
2.0.9
|
||||
✲
|
||||
Press H to see the keyboard shortcuts
|
||||
✲
|
||||
<a href='http://twitter.com/netzpirat' target='_parent'>@netzpirat</a>
|
||||
✲
|
||||
<a href='http://twitter.com/_inossidabile' target='_parent'>@_inossidabile</a>
|
||||
</div>
|
||||
<iframe id='search_frame'></iframe>
|
||||
<div id='fuzzySearch'>
|
||||
<input type='text'>
|
||||
<ol></ol>
|
||||
</div>
|
||||
<div id='help'>
|
||||
<p>
|
||||
Quickly fuzzy find classes, mixins, methods, file:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>T</span>
|
||||
Open fuzzy finder dialog
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
Control the navigation frame:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>L</span>
|
||||
Toggle list view
|
||||
</li>
|
||||
<li>
|
||||
<span>C</span>
|
||||
Show class list
|
||||
</li>
|
||||
<li>
|
||||
<span>I</span>
|
||||
Show mixin list
|
||||
</li>
|
||||
<li>
|
||||
<span>F</span>
|
||||
Show file list
|
||||
</li>
|
||||
<li>
|
||||
<span>M</span>
|
||||
Show method list
|
||||
</li>
|
||||
<li>
|
||||
<span>E</span>
|
||||
Show extras list
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
You can focus and blur the search input:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>S</span>
|
||||
Focus search input
|
||||
</li>
|
||||
<li>
|
||||
<span>Esc</span>
|
||||
Blur search input
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,113 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='UTF-8'>
|
||||
<title>Yatta! API</title>
|
||||
<script src='../../../javascript/application.js'></script>
|
||||
<script src='../../../javascript/search.js'></script>
|
||||
<link rel='stylesheet' href='../../../stylesheets/application.css' type='text/css'>
|
||||
</head>
|
||||
<body>
|
||||
<div id='base' data-path='../../../'></div>
|
||||
<div id='header'>
|
||||
<div id='menu'>
|
||||
<a href='../../../extra/README.md.html' title='Yatta!'>
|
||||
Yatta!
|
||||
</a>
|
||||
»
|
||||
<a href='../../../alphabetical_index.html' title='Index'>
|
||||
Index
|
||||
</a>
|
||||
»
|
||||
<span class='title'>lib</span>
|
||||
»
|
||||
<span class='title'>Types</span>
|
||||
»
|
||||
<span class='title'>XmlTypes.coffee</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id='content'>
|
||||
<h1>
|
||||
File:
|
||||
XmlTypes.coffee
|
||||
</h1>
|
||||
<table class='box'>
|
||||
<tr>
|
||||
<td>Defined in:</td>
|
||||
<td>lib/Types</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
August 24, 14 01:51:08 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
2.0.9
|
||||
✲
|
||||
Press H to see the keyboard shortcuts
|
||||
✲
|
||||
<a href='http://twitter.com/netzpirat' target='_parent'>@netzpirat</a>
|
||||
✲
|
||||
<a href='http://twitter.com/_inossidabile' target='_parent'>@_inossidabile</a>
|
||||
</div>
|
||||
<iframe id='search_frame'></iframe>
|
||||
<div id='fuzzySearch'>
|
||||
<input type='text'>
|
||||
<ol></ol>
|
||||
</div>
|
||||
<div id='help'>
|
||||
<p>
|
||||
Quickly fuzzy find classes, mixins, methods, file:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>T</span>
|
||||
Open fuzzy finder dialog
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
Control the navigation frame:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>L</span>
|
||||
Toggle list view
|
||||
</li>
|
||||
<li>
|
||||
<span>C</span>
|
||||
Show class list
|
||||
</li>
|
||||
<li>
|
||||
<span>I</span>
|
||||
Show mixin list
|
||||
</li>
|
||||
<li>
|
||||
<span>F</span>
|
||||
Show file list
|
||||
</li>
|
||||
<li>
|
||||
<span>M</span>
|
||||
Show method list
|
||||
</li>
|
||||
<li>
|
||||
<span>E</span>
|
||||
Show extras list
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
You can focus and blur the search input:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>S</span>
|
||||
Focus search input
|
||||
</li>
|
||||
<li>
|
||||
<span>Esc</span>
|
||||
Blur search input
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,111 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='UTF-8'>
|
||||
<title>Yatta! API</title>
|
||||
<script src='../../javascript/application.js'></script>
|
||||
<script src='../../javascript/search.js'></script>
|
||||
<link rel='stylesheet' href='../../stylesheets/application.css' type='text/css'>
|
||||
</head>
|
||||
<body>
|
||||
<div id='base' data-path='../../'></div>
|
||||
<div id='header'>
|
||||
<div id='menu'>
|
||||
<a href='../../extra/README.md.html' title='Yatta!'>
|
||||
Yatta!
|
||||
</a>
|
||||
»
|
||||
<a href='../../alphabetical_index.html' title='Index'>
|
||||
Index
|
||||
</a>
|
||||
»
|
||||
<span class='title'>lib</span>
|
||||
»
|
||||
<span class='title'>index.coffee</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id='content'>
|
||||
<h1>
|
||||
File:
|
||||
index.coffee
|
||||
</h1>
|
||||
<table class='box'>
|
||||
<tr>
|
||||
<td>Defined in:</td>
|
||||
<td>lib</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id='footer'>
|
||||
August 24, 14 01:51:08 by
|
||||
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
|
||||
Codo
|
||||
</a>
|
||||
2.0.9
|
||||
✲
|
||||
Press H to see the keyboard shortcuts
|
||||
✲
|
||||
<a href='http://twitter.com/netzpirat' target='_parent'>@netzpirat</a>
|
||||
✲
|
||||
<a href='http://twitter.com/_inossidabile' target='_parent'>@_inossidabile</a>
|
||||
</div>
|
||||
<iframe id='search_frame'></iframe>
|
||||
<div id='fuzzySearch'>
|
||||
<input type='text'>
|
||||
<ol></ol>
|
||||
</div>
|
||||
<div id='help'>
|
||||
<p>
|
||||
Quickly fuzzy find classes, mixins, methods, file:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>T</span>
|
||||
Open fuzzy finder dialog
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
Control the navigation frame:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>L</span>
|
||||
Toggle list view
|
||||
</li>
|
||||
<li>
|
||||
<span>C</span>
|
||||
Show class list
|
||||
</li>
|
||||
<li>
|
||||
<span>I</span>
|
||||
Show mixin list
|
||||
</li>
|
||||
<li>
|
||||
<span>F</span>
|
||||
Show file list
|
||||
</li>
|
||||
<li>
|
||||
<span>M</span>
|
||||
Show method list
|
||||
</li>
|
||||
<li>
|
||||
<span>E</span>
|
||||
Show extras list
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
You can focus and blur the search input:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span>S</span>
|
||||
Focus search input
|
||||
</li>
|
||||
<li>
|
||||
<span>Esc</span>
|
||||
Blur search input
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,172 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='UTF-8'>
|
||||
<title>Yatta! API</title>
|
||||
<script src='javascript/application.js'></script>
|
||||
<script src='javascript/search.js'></script>
|
||||
<link rel='stylesheet' href='stylesheets/application.css' type='text/css'>
|
||||
</head>
|
||||
<body class='list'>
|
||||
<div class='list tree' id='content'>
|
||||
<h1 class='full_list_header'>File List</h1>
|
||||
<nav>
|
||||
<a target='_self' href='class_list.html'>
|
||||
Classes
|
||||
</a>
|
||||
<a target='_self' href='file_list.html'>
|
||||
Files
|
||||
</a>
|
||||
<a target='_self' href='method_list.html'>
|
||||
Methods
|
||||
</a>
|
||||
<a target='_self' href='extra_list.html'>
|
||||
Extras
|
||||
</a>
|
||||
</nav>
|
||||
<div id='search'>
|
||||
Search:
|
||||
<input type='text'>
|
||||
</div>
|
||||
<ul>
|
||||
<li>
|
||||
<span>
|
||||
lib
|
||||
</span>
|
||||
</li>
|
||||
<ul>
|
||||
<li>
|
||||
<span>
|
||||
Connectors
|
||||
</span>
|
||||
</li>
|
||||
<ul>
|
||||
<li>
|
||||
<a href='file/lib/Connectors/IwcConnector.coffee.html' target='main'>
|
||||
IwcConnector.coffee
|
||||
</a>
|
||||
<small class='namespace'>
|
||||
lib/Connectors
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='file/lib/Connectors/PeerJsConnector.coffee.html' target='main'>
|
||||
PeerJsConnector.coffee
|
||||
</a>
|
||||
<small class='namespace'>
|
||||
lib/Connectors
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='file/lib/Connectors/TestConnector.coffee.html' target='main'>
|
||||
TestConnector.coffee
|
||||
</a>
|
||||
<small class='namespace'>
|
||||
lib/Connectors
|
||||
</small>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<li>
|
||||
<a href='file/lib/Engine.coffee.html' target='main'>
|
||||
Engine.coffee
|
||||
</a>
|
||||
<small class='namespace'>
|
||||
lib
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<span>
|
||||
Frameworks
|
||||
</span>
|
||||
</li>
|
||||
<ul>
|
||||
<li>
|
||||
<a href='file/lib/Frameworks/JsonFramework.coffee.html' target='main'>
|
||||
JsonFramework.coffee
|
||||
</a>
|
||||
<small class='namespace'>
|
||||
lib/Frameworks
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='file/lib/Frameworks/TextFramework.coffee.html' target='main'>
|
||||
TextFramework.coffee
|
||||
</a>
|
||||
<small class='namespace'>
|
||||
lib/Frameworks
|
||||
</small>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<li>
|
||||
<a href='file/lib/HistoryBuffer.coffee.html' target='main'>
|
||||
HistoryBuffer.coffee
|
||||
</a>
|
||||
<small class='namespace'>
|
||||
lib
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<span>
|
||||
Types
|
||||
</span>
|
||||
</li>
|
||||
<ul>
|
||||
<li>
|
||||
<a href='file/lib/Types/BasicTypes.coffee.html' target='main'>
|
||||
BasicTypes.coffee
|
||||
</a>
|
||||
<small class='namespace'>
|
||||
lib/Types
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='file/lib/Types/JsonTypes.coffee.html' target='main'>
|
||||
JsonTypes.coffee
|
||||
</a>
|
||||
<small class='namespace'>
|
||||
lib/Types
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='file/lib/Types/StructuredTypes.coffee.html' target='main'>
|
||||
StructuredTypes.coffee
|
||||
</a>
|
||||
<small class='namespace'>
|
||||
lib/Types
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='file/lib/Types/TextTypes.coffee.html' target='main'>
|
||||
TextTypes.coffee
|
||||
</a>
|
||||
<small class='namespace'>
|
||||
lib/Types
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='file/lib/Types/XmlTypes.coffee.html' target='main'>
|
||||
XmlTypes.coffee
|
||||
</a>
|
||||
<small class='namespace'>
|
||||
lib/Types
|
||||
</small>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<li>
|
||||
<a href='file/lib/index.coffee.html' target='main'>
|
||||
index.coffee
|
||||
</a>
|
||||
<small class='namespace'>
|
||||
lib
|
||||
</small>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,14 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='UTF-8'>
|
||||
<title>Yatta! API</title>
|
||||
<script src='javascript/application.js'></script>
|
||||
<script src='javascript/search.js'></script>
|
||||
<link rel='stylesheet' href='stylesheets/application.css' type='text/css'>
|
||||
</head>
|
||||
<frameset cols='25%, *'>
|
||||
<frame name='list' src='class_list.html'></frame>
|
||||
<frame name='main' src='extra/README.md.html'></frame>
|
||||
</frameset>
|
||||
</html>
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@@ -1,427 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='UTF-8'>
|
||||
<title>Yatta! API</title>
|
||||
<script src='javascript/application.js'></script>
|
||||
<script src='javascript/search.js'></script>
|
||||
<link rel='stylesheet' href='stylesheets/application.css' type='text/css'>
|
||||
</head>
|
||||
<body class='list'>
|
||||
<div class='list' id='content'>
|
||||
<h1 class='full_list_header'>Method List</h1>
|
||||
<nav>
|
||||
<a target='_self' href='class_list.html'>
|
||||
Classes
|
||||
</a>
|
||||
<a target='_self' href='file_list.html'>
|
||||
Files
|
||||
</a>
|
||||
<a target='_self' href='method_list.html'>
|
||||
Methods
|
||||
</a>
|
||||
<a target='_self' href='extra_list.html'>
|
||||
Extras
|
||||
</a>
|
||||
</nav>
|
||||
<div id='search'>
|
||||
Search:
|
||||
<input type='text'>
|
||||
</div>
|
||||
<ul>
|
||||
<li>
|
||||
<a href='class/WordType.html#_encode-dynamic' target='main' title='_encode'>
|
||||
#_encode
|
||||
</a>
|
||||
<small>
|
||||
(WordType)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/JsonType.html#_encode-dynamic' target='main' title='_encode'>
|
||||
#_encode
|
||||
</a>
|
||||
<small>
|
||||
(JsonType)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/PeerJsConnector.html#addConnection-dynamic' target='main' title='addConnection'>
|
||||
#addConnection
|
||||
</a>
|
||||
<small>
|
||||
(PeerJsConnector)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/WordType.html#bind-dynamic' target='main' title='bind'>
|
||||
#bind
|
||||
</a>
|
||||
<small>
|
||||
(WordType)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/TextFramework.html#bind-dynamic' target='main' title='bind'>
|
||||
#bind
|
||||
</a>
|
||||
<small>
|
||||
(TextFramework)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/PeerJsConnector.html#connectToPeer-dynamic' target='main' title='connectToPeer'>
|
||||
#connectToPeer
|
||||
</a>
|
||||
<small>
|
||||
(PeerJsConnector)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/IwcConnector.html#constructor-dynamic' target='main' title='constructor'>
|
||||
#constructor
|
||||
</a>
|
||||
<small>
|
||||
(IwcConnector)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/WordType.html#constructor-dynamic' target='main' title='constructor'>
|
||||
#constructor
|
||||
</a>
|
||||
<small>
|
||||
(WordType)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/JsonTypeWrapper.html#constructor-dynamic' target='main' title='constructor'>
|
||||
#constructor
|
||||
</a>
|
||||
<small>
|
||||
(JsonTypeWrapper)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/TextFramework.html#constructor-dynamic' target='main' title='constructor'>
|
||||
#constructor
|
||||
</a>
|
||||
<small>
|
||||
(TextFramework)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/JsonFramework.html#constructor-dynamic' target='main' title='constructor'>
|
||||
#constructor
|
||||
</a>
|
||||
<small>
|
||||
(JsonFramework)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/JsonType.html#constructor-dynamic' target='main' title='constructor'>
|
||||
#constructor
|
||||
</a>
|
||||
<small>
|
||||
(JsonType)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/PeerJsConnector.html#constructor-dynamic' target='main' title='constructor'>
|
||||
#constructor
|
||||
</a>
|
||||
<small>
|
||||
(PeerJsConnector)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='file/lib/Connectors/IwcConnector.coffee.html#createIwcConnector-' target='main' title='createIwcConnector'>
|
||||
~createIwcConnector
|
||||
</a>
|
||||
<small>
|
||||
(lib/Connectors/IwcConnector.coffee)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='file/lib/Connectors/PeerJsConnector.coffee.html#createPeerJsConnector-' target='main' title='createPeerJsConnector'>
|
||||
~createPeerJsConnector
|
||||
</a>
|
||||
<small>
|
||||
(lib/Connectors/PeerJsConnector.coffee)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/JsonFramework.html#deleteListener-dynamic' target='main' title='deleteListener'>
|
||||
#deleteListener
|
||||
</a>
|
||||
<small>
|
||||
(JsonFramework)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/WordType.html#deleteText-dynamic' target='main' title='deleteText'>
|
||||
#deleteText
|
||||
</a>
|
||||
<small>
|
||||
(WordType)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/TextFramework.html#deleteText-dynamic' target='main' title='deleteText'>
|
||||
#deleteText
|
||||
</a>
|
||||
<small>
|
||||
(TextFramework)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/PeerJsConnector.html#getAllConnectionIds-dynamic' target='main' title='getAllConnectionIds'>
|
||||
#getAllConnectionIds
|
||||
</a>
|
||||
<small>
|
||||
(PeerJsConnector)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/JsonFramework.html#getConnector-dynamic' target='main' title='getConnector'>
|
||||
#getConnector
|
||||
</a>
|
||||
<small>
|
||||
(JsonFramework)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/TextFramework.html#getConnector-dynamic' target='main' title='getConnector'>
|
||||
#getConnector
|
||||
</a>
|
||||
<small>
|
||||
(TextFramework)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/JsonFramework.html#getHistoryBuffer-dynamic' target='main' title='getHistoryBuffer'>
|
||||
#getHistoryBuffer
|
||||
</a>
|
||||
<small>
|
||||
(JsonFramework)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/TextFramework.html#getHistoryBuffer-dynamic' target='main' title='getHistoryBuffer'>
|
||||
#getHistoryBuffer
|
||||
</a>
|
||||
<small>
|
||||
(TextFramework)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/JsonType.html#getParent-dynamic' target='main' title='getParent'>
|
||||
#getParent
|
||||
</a>
|
||||
<small>
|
||||
(JsonType)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/TextFramework.html#getSharedObject-dynamic' target='main' title='getSharedObject'>
|
||||
#getSharedObject
|
||||
</a>
|
||||
<small>
|
||||
(TextFramework)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/JsonFramework.html#getSharedObject-dynamic' target='main' title='getSharedObject'>
|
||||
#getSharedObject
|
||||
</a>
|
||||
<small>
|
||||
(JsonFramework)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/JsonFramework.html#getUserId-dynamic' target='main' title='getUserId'>
|
||||
#getUserId
|
||||
</a>
|
||||
<small>
|
||||
(JsonFramework)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/TextFramework.html#getUserId-dynamic' target='main' title='getUserId'>
|
||||
#getUserId
|
||||
</a>
|
||||
<small>
|
||||
(TextFramework)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/TextFramework.html#insertText-dynamic' target='main' title='insertText'>
|
||||
#insertText
|
||||
</a>
|
||||
<small>
|
||||
(TextFramework)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/WordType.html#insertText-dynamic' target='main' title='insertText'>
|
||||
#insertText
|
||||
</a>
|
||||
<small>
|
||||
(WordType)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/JsonFramework.html#on-dynamic' target='main' title='on'>
|
||||
#on
|
||||
</a>
|
||||
<small>
|
||||
(JsonFramework)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/TextFramework.html#on-dynamic' target='main' title='on'>
|
||||
#on
|
||||
</a>
|
||||
<small>
|
||||
(TextFramework)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/IwcConnector.html#receive-dynamic' target='main' title='receive'>
|
||||
#receive
|
||||
</a>
|
||||
<small>
|
||||
(IwcConnector)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/WordType.html#replaceText-dynamic' target='main' title='replaceText'>
|
||||
#replaceText
|
||||
</a>
|
||||
<small>
|
||||
(WordType)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/TextFramework.html#replaceText-dynamic' target='main' title='replaceText'>
|
||||
#replaceText
|
||||
</a>
|
||||
<small>
|
||||
(TextFramework)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/IwcConnector.html#send-dynamic' target='main' title='send'>
|
||||
#send
|
||||
</a>
|
||||
<small>
|
||||
(IwcConnector)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/IwcConnector.html#sendIwcIntent-dynamic' target='main' title='sendIwcIntent'>
|
||||
#sendIwcIntent
|
||||
</a>
|
||||
<small>
|
||||
(IwcConnector)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/IwcConnector.html#setIwcHandler-dynamic' target='main' title='setIwcHandler'>
|
||||
#setIwcHandler
|
||||
</a>
|
||||
<small>
|
||||
(IwcConnector)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/JsonType.html#setMutableDefault-dynamic' target='main' title='setMutableDefault'>
|
||||
#setMutableDefault
|
||||
</a>
|
||||
<small>
|
||||
(JsonType)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/JsonFramework.html#setMutableDefault-dynamic' target='main' title='setMutableDefault'>
|
||||
#setMutableDefault
|
||||
</a>
|
||||
<small>
|
||||
(JsonFramework)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/JsonType.html#setReplaceManager-dynamic' target='main' title='setReplaceManager'>
|
||||
#setReplaceManager
|
||||
</a>
|
||||
<small>
|
||||
(JsonType)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/WordType.html#setReplaceManager-dynamic' target='main' title='setReplaceManager'>
|
||||
#setReplaceManager
|
||||
</a>
|
||||
<small>
|
||||
(WordType)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/JsonType.html#toJson-dynamic' target='main' title='toJson'>
|
||||
#toJson
|
||||
</a>
|
||||
<small>
|
||||
(JsonType)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/JsonFramework.html#toJson-dynamic' target='main' title='toJson'>
|
||||
#toJson
|
||||
</a>
|
||||
<small>
|
||||
(JsonFramework)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/WordType.html#toString-dynamic' target='main' title='toString'>
|
||||
#toString
|
||||
</a>
|
||||
<small>
|
||||
(WordType)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/JsonType.html#val-dynamic' target='main' title='val'>
|
||||
#val
|
||||
</a>
|
||||
<small>
|
||||
(JsonType)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/WordType.html#val-dynamic' target='main' title='val'>
|
||||
#val
|
||||
</a>
|
||||
<small>
|
||||
(WordType)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/JsonFramework.html#val-dynamic' target='main' title='val'>
|
||||
#val
|
||||
</a>
|
||||
<small>
|
||||
(JsonFramework)
|
||||
</small>
|
||||
</li>
|
||||
<li>
|
||||
<a href='class/TextFramework.html#val-dynamic' target='main' title='val'>
|
||||
#val
|
||||
</a>
|
||||
<small>
|
||||
(TextFramework)
|
||||
</small>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,36 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset='UTF-8'>
|
||||
<title>Yatta! API</title>
|
||||
<script src='javascript/application.js'></script>
|
||||
<script src='javascript/search.js'></script>
|
||||
<link rel='stylesheet' href='stylesheets/application.css' type='text/css'>
|
||||
</head>
|
||||
<body class='list'>
|
||||
<div class='list tree' id='content'>
|
||||
<h1 class='full_list_header'>Mixin List</h1>
|
||||
<nav>
|
||||
<a target='_self' href='class_list.html'>
|
||||
Classes
|
||||
</a>
|
||||
<a target='_self' href='file_list.html'>
|
||||
Files
|
||||
</a>
|
||||
<a target='_self' href='method_list.html'>
|
||||
Methods
|
||||
</a>
|
||||
<a target='_self' href='extra_list.html'>
|
||||
Extras
|
||||
</a>
|
||||
</nav>
|
||||
<div id='search'>
|
||||
Search:
|
||||
<input type='text'>
|
||||
</div>
|
||||
<ul>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,745 +0,0 @@
|
||||
pre code{display:block;padding:.5em;background:#f0f0f0}pre code,pre .subst,pre .tag .title,pre .lisp .title,pre .clojure .built_in,pre .nginx .title{color:black}pre .string,pre .title,pre .constant,pre .parent,pre .tag .value,pre .rules .value,pre .rules .value .number,pre .preprocessor,pre .haml .symbol,pre .ruby .symbol,pre .ruby .symbol .string,pre .aggregate,pre .template_tag,pre .django .variable,pre .smalltalk .class,pre .addition,pre .flow,pre .stream,pre .bash .variable,pre .apache .tag,pre .apache .cbracket,pre .tex .command,pre .tex .special,pre .erlang_repl .function_or_atom,pre .asciidoc .header,pre .markdown .header,pre .coffeescript .attribute{color:#800}pre .comment,pre .annotation,pre .template_comment,pre .diff .header,pre .chunk,pre .asciidoc .blockquote,pre .markdown .blockquote{color:#888}pre .number,pre .date,pre .regexp,pre .literal,pre .hexcolor,pre .smalltalk .symbol,pre .smalltalk .char,pre .go .constant,pre .change,pre .lasso .variable,pre .asciidoc .bullet,pre .markdown .bullet,pre .asciidoc .link_url,pre .markdown .link_url{color:#080}pre .label,pre .javadoc,pre .ruby .string,pre .decorator,pre .filter .argument,pre .localvars,pre .array,pre .attr_selector,pre .important,pre .pseudo,pre .pi,pre .haml .bullet,pre .doctype,pre .deletion,pre .envvar,pre .shebang,pre .apache .sqbracket,pre .nginx .built_in,pre .tex .formula,pre .erlang_repl .reserved,pre .prompt,pre .asciidoc .link_label,pre .markdown .link_label,pre .vhdl .attribute,pre .clojure .attribute,pre .asciidoc .attribute,pre .lasso .attribute,pre .coffeescript .property{color:#88F}pre .keyword,pre .id,pre .title,pre .built_in,pre .aggregate,pre .css .tag,pre .javadoctag,pre .phpdoc,pre .yardoctag,pre .smalltalk .class,pre .winutils,pre .bash .variable,pre .apache .tag,pre .go .typename,pre .tex .command,pre .asciidoc .strong,pre .markdown .strong,pre .request,pre .status{font-weight:bold}pre .asciidoc .emphasis,pre .markdown .emphasis{font-style:italic}pre .nginx .built_in{font-weight:normal}pre .coffeescript .javascript,pre .javascript .xml,pre .lasso .markup,pre .tex .formula,pre .xml .javascript,pre .xml .vbscript,pre .xml .css,pre .xml .cdata{opacity:.5}
|
||||
body {
|
||||
padding: 0 5px;
|
||||
font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif;
|
||||
font-size: 13px;
|
||||
}
|
||||
h1 {
|
||||
font-size: 25px;
|
||||
margin: 0.8em 0 0.5em;
|
||||
padding-top: 4px;
|
||||
border-top: 1px dotted #d5d5d5;
|
||||
}
|
||||
h2 {
|
||||
padding: 0;
|
||||
padding-bottom: 3px;
|
||||
border-bottom: 1px #aaa solid;
|
||||
font-size: 1.4em;
|
||||
margin: 1.8em 0 0.5em;
|
||||
}
|
||||
#base {
|
||||
display: none;
|
||||
}
|
||||
#fuzzySearch {
|
||||
-webkit-box-shadow: rgba(0,0,0,0.5) 0px 10px 30px 10px;
|
||||
box-shadow: rgba(0,0,0,0.5) 0px 10px 30px 10px;
|
||||
-webkit-border-radius: 10px;
|
||||
border-radius: 10px;
|
||||
position: fixed;
|
||||
z-index: 8000;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 25px;
|
||||
width: 80%;
|
||||
height: 45px;
|
||||
margin: 0 auto;
|
||||
display: none;
|
||||
background-color: #fff;
|
||||
padding-top: 25px;
|
||||
padding-bottom: 25px;
|
||||
}
|
||||
#fuzzySearch input {
|
||||
margin-left: 10%;
|
||||
-webkit-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
width: 80%;
|
||||
border: 2px solid #05a;
|
||||
font-size: 20px;
|
||||
padding: 5px;
|
||||
}
|
||||
#fuzzySearch ol {
|
||||
list-style-type: none;
|
||||
margin: 10px 0 0 0;
|
||||
padding: 0;
|
||||
}
|
||||
#fuzzySearch ol li {
|
||||
padding: 3px;
|
||||
}
|
||||
#fuzzySearch ol li.stripe {
|
||||
background: #f0f0f0;
|
||||
}
|
||||
#fuzzySearch ol li.selected {
|
||||
background: #05a;
|
||||
}
|
||||
#fuzzySearch ol li.selected a {
|
||||
color: #fff;
|
||||
}
|
||||
#fuzzySearch ol li.selected a:visited {
|
||||
color: #fff;
|
||||
}
|
||||
#fuzzySearch ol li.selected a:hover {
|
||||
color: #05a;
|
||||
}
|
||||
#fuzzySearch ol li.selected a span {
|
||||
color: #05a;
|
||||
}
|
||||
#fuzzySearch ol li a {
|
||||
color: #05a;
|
||||
font-size: 18px;
|
||||
text-decoration: none;
|
||||
}
|
||||
#fuzzySearch ol li a:visited {
|
||||
color: #05a;
|
||||
}
|
||||
#fuzzySearch ol li a:hover {
|
||||
background: #ffffa5;
|
||||
}
|
||||
#fuzzySearch ol li a span {
|
||||
background-color: #ff0;
|
||||
}
|
||||
#fuzzySearch ol li small {
|
||||
font-size: 14px;
|
||||
padding-left: 10px;
|
||||
color: #888;
|
||||
}
|
||||
#help {
|
||||
-webkit-box-shadow: rgba(0,0,0,0.5) 0px 10px 30px 10px;
|
||||
box-shadow: rgba(0,0,0,0.5) 0px 10px 30px 10px;
|
||||
-webkit-border-radius: 10px;
|
||||
border-radius: 10px;
|
||||
position: fixed;
|
||||
z-index: 8000;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 50%;
|
||||
width: 500px;
|
||||
height: 460px;
|
||||
margin: 0 auto;
|
||||
margin-top: -265px;
|
||||
display: none;
|
||||
padding: 25px;
|
||||
background-color: #fff;
|
||||
}
|
||||
#help ul {
|
||||
list-style-type: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
#help ul li {
|
||||
height: 35px;
|
||||
font-weight: bold;
|
||||
}
|
||||
#help ul li span {
|
||||
-webkit-box-shadow: rgba(0,0,0,0.5) 1px 1px 2px;
|
||||
box-shadow: rgba(0,0,0,0.5) 1px 1px 2px;
|
||||
-webkit-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
display: block;
|
||||
float: left;
|
||||
width: 50px;
|
||||
padding: 5px;
|
||||
margin-right: 20px;
|
||||
background: #eee;
|
||||
text-align: center;
|
||||
}
|
||||
#content a:link,
|
||||
#content a:visited {
|
||||
text-decoration: none;
|
||||
color: #05a;
|
||||
}
|
||||
#content a:hover {
|
||||
background: #ffffa5;
|
||||
}
|
||||
#content #filecontents img {
|
||||
border: 0;
|
||||
}
|
||||
#content #filecontents li {
|
||||
line-height: 25px;
|
||||
}
|
||||
#content #filecontents table {
|
||||
padding: 0;
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
}
|
||||
#content #filecontents table tr {
|
||||
border-top: 1px solid #ccc;
|
||||
background-color: #fff;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
#content #filecontents table tr td {
|
||||
border: 1px solid #ccc;
|
||||
text-align: left;
|
||||
margin: 0;
|
||||
padding: 6px 13px;
|
||||
}
|
||||
#content table.box {
|
||||
font-size: 1em;
|
||||
line-height: 2;
|
||||
border-spacing: 0;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
#content table.box tr {
|
||||
background-color: #fff;
|
||||
}
|
||||
#content table.box tr:first-child {
|
||||
background-color: #eee;
|
||||
}
|
||||
#content table.box tr td {
|
||||
border: 1px solid #aaa;
|
||||
}
|
||||
#content table.box tr td:first-child {
|
||||
width: 100px;
|
||||
padding-right: 10px;
|
||||
text-align: right;
|
||||
font-weight: bold;
|
||||
}
|
||||
#content table.box tr td:last-child {
|
||||
min-width: 420px;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
#content h1 .note,
|
||||
#content li .note,
|
||||
#content .properties .note,
|
||||
#content .method_details .signature .note {
|
||||
font-weight: normal;
|
||||
padding: 3px 5px;
|
||||
position: relative;
|
||||
top: -3px;
|
||||
text-transform: capitalize;
|
||||
display: inline;
|
||||
}
|
||||
#content .method_details .signature .note {
|
||||
font-size: 0.6em;
|
||||
top: -1px;
|
||||
}
|
||||
#content h1 .note {
|
||||
font-size: 0.5em;
|
||||
}
|
||||
#content li .note {
|
||||
top: 0px;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
#content .properties .note {
|
||||
top: 0px;
|
||||
font-size: 0.85em;
|
||||
}
|
||||
#content ul.summary,
|
||||
#content .properties {
|
||||
list-style: none;
|
||||
font-family: monospace;
|
||||
font-size: 1em;
|
||||
line-height: 1.5em;
|
||||
}
|
||||
#content ul.summary li,
|
||||
#content .properties li {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
#content ul.summary .signature,
|
||||
#content .properties .signature {
|
||||
-webkit-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
padding: 1px 10px;
|
||||
color: #05a;
|
||||
background: #eaeaff;
|
||||
border: 1px solid #dfdfe5;
|
||||
}
|
||||
#content ul.summary .signature a:hover,
|
||||
#content .properties .signature a:hover {
|
||||
background: transparent;
|
||||
}
|
||||
#content ul.summary li[deprecated] .signature,
|
||||
#content .properties li[deprecated] .signature {
|
||||
text-decoration: line-through;
|
||||
}
|
||||
#content ul.summary .signature + .note.title,
|
||||
#content .properties .signature + .note.title {
|
||||
margin-left: 7px;
|
||||
}
|
||||
#content ul.summary .desc,
|
||||
#content .properties .desc {
|
||||
margin-left: 32px;
|
||||
display: block;
|
||||
font-family: sans-serif;
|
||||
}
|
||||
#content ul.summary .desc p,
|
||||
#content .properties .desc p {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
#content dl.constants dt {
|
||||
font-weight: bold;
|
||||
}
|
||||
#content dl.constants,
|
||||
#content dl.properties {
|
||||
margin-left: 40px;
|
||||
}
|
||||
#content dl.constants dt,
|
||||
#content dl.properties dt {
|
||||
font-size: 1.1em;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
#content dl.constants dt .docstring,
|
||||
#content dl.properties dt .docstring {
|
||||
margin-left: 32px;
|
||||
font-size: 0.9em;
|
||||
font-weight: normal;
|
||||
}
|
||||
#content dl.constants dd,
|
||||
#content dl.properties dd {
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
#content .method_details {
|
||||
border-top: 1px dotted #aaa;
|
||||
margin-top: 15px;
|
||||
padding-top: 0;
|
||||
}
|
||||
#content .method_details:first-child {
|
||||
border: none;
|
||||
}
|
||||
#content .method_details p.signature {
|
||||
-webkit-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
font-size: 1.1em;
|
||||
font-weight: normal;
|
||||
font-family: Monaco, Consolas, Courier, monospace;
|
||||
padding: 6px 10px;
|
||||
margin-top: 18px;
|
||||
background: #e5e8ff;
|
||||
border: 1px solid #d8d8e5;
|
||||
}
|
||||
#content .tags {
|
||||
font-size: 13px;
|
||||
}
|
||||
#content .tags h3 {
|
||||
font-size: 1em;
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
#content .tags ul {
|
||||
margin-top: 0px;
|
||||
padding-left: 30px;
|
||||
list-style: square;
|
||||
}
|
||||
#content .tags ul .name {
|
||||
font-family: monospace;
|
||||
font-weight: bold;
|
||||
}
|
||||
#content .tags .overloads h3 {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
#content .tags .overloads .overload {
|
||||
margin-left: 20px;
|
||||
}
|
||||
#content .tags .overloads .overload p.signature {
|
||||
padding-top: 2px;
|
||||
padding-bottom: 2px;
|
||||
}
|
||||
#content .tags .events h3 {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
#content .tags .events .event {
|
||||
margin-left: 20px;
|
||||
}
|
||||
#content .tags .events .event p.signature {
|
||||
padding-top: 2px;
|
||||
padding-bottom: 2px;
|
||||
}
|
||||
#content .note {
|
||||
-webkit-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
margin-top: 10px;
|
||||
color: #222;
|
||||
background: #e3e4e3;
|
||||
border: 1px solid #d5d5d5;
|
||||
padding: 7px 10px;
|
||||
display: block;
|
||||
}
|
||||
#content .deprecated {
|
||||
background: #ffe5e5;
|
||||
border-color: #e9dada;
|
||||
}
|
||||
#content .writeonly {
|
||||
background: #d3ff97;
|
||||
border-color: #c3eb8b;
|
||||
}
|
||||
#content .readonly {
|
||||
background: #ffe5e5;
|
||||
border-color: #e9dada;
|
||||
}
|
||||
#content .bound {
|
||||
background: #d3ff97;
|
||||
border-color: #c3eb8b;
|
||||
}
|
||||
#content .todo {
|
||||
background: #ffffc5;
|
||||
border-color: #ececaa;
|
||||
}
|
||||
#content .private {
|
||||
background: #d5d5d5;
|
||||
border-color: #c5c5c5;
|
||||
}
|
||||
#content .constructor {
|
||||
color: #fff;
|
||||
background: #6a98d6;
|
||||
border-color: #6689d6;
|
||||
}
|
||||
#content h3.inherited,
|
||||
#content h3.included,
|
||||
#content h3.extended {
|
||||
font-style: italic;
|
||||
font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif;
|
||||
font-weight: normal;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
margin-top: 12px;
|
||||
margin-bottom: 3px;
|
||||
font-size: 13px;
|
||||
}
|
||||
#content p.inherited,
|
||||
#content p.included,
|
||||
#content p.extended {
|
||||
word-spacing: 5px;
|
||||
font-size: 1.2em;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
margin-left: 25px;
|
||||
}
|
||||
#content p.inherited a,
|
||||
#content p.included a,
|
||||
#content p.extended a {
|
||||
font-family: monospace;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
#footer {
|
||||
margin-top: 15px;
|
||||
border-top: 1px solid #ccc;
|
||||
text-align: center;
|
||||
padding: 7px 0;
|
||||
font-size: 12px;
|
||||
color: #999;
|
||||
}
|
||||
#footer a:link,
|
||||
#footer a:visited {
|
||||
color: #999;
|
||||
text-decoration: none;
|
||||
border-bottom: 1px dotted #bbd;
|
||||
}
|
||||
#footer a:hover {
|
||||
color: #05a;
|
||||
}
|
||||
#menu {
|
||||
font-size: 1.3em;
|
||||
color: #bbb;
|
||||
top: -5px;
|
||||
position: relative;
|
||||
}
|
||||
#menu .title,
|
||||
#menu a {
|
||||
font-size: 0.7em;
|
||||
}
|
||||
#menu .title a {
|
||||
font-size: 1em;
|
||||
}
|
||||
#menu .title {
|
||||
color: #555;
|
||||
}
|
||||
#menu a:link,
|
||||
#menu a:visited {
|
||||
color: #333;
|
||||
text-decoration: none;
|
||||
border-bottom: 1px dotted #bbd;
|
||||
}
|
||||
#menu a:hover {
|
||||
color: #05a;
|
||||
}
|
||||
#header nav {
|
||||
float: right;
|
||||
color: #000;
|
||||
font-size: 0.7em;
|
||||
}
|
||||
#header nav ul {
|
||||
list-style-type: none;
|
||||
margin: 4px !important;
|
||||
}
|
||||
#header nav ul,
|
||||
#header nav ul li {
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
display: inline;
|
||||
}
|
||||
#header nav a {
|
||||
font-size: 1em;
|
||||
}
|
||||
#header #search {
|
||||
float: right;
|
||||
margin-top: -3px;
|
||||
}
|
||||
#header #search a:link,
|
||||
#header #search a:visited {
|
||||
-webkit-box-shadow: #ddd -1px 1px 3px;
|
||||
box-shadow: #ddd -1px 1px 3px;
|
||||
border-bottom-left-radius: 3px;
|
||||
border-bottom-right-radius: 3px;
|
||||
display: block;
|
||||
float: left;
|
||||
margin-right: 4px;
|
||||
padding: 8px 10px;
|
||||
color: #05a;
|
||||
background: #eaf0ff;
|
||||
text-decoration: none;
|
||||
border: 1px solid #d8d8e5;
|
||||
}
|
||||
#header #search a:hover {
|
||||
background: #f5faff;
|
||||
color: #06b;
|
||||
}
|
||||
#header #search a.active {
|
||||
border-top-left-radius: 5px;
|
||||
border-top-right-radius: 5px;
|
||||
padding-bottom: 20px;
|
||||
color: #fff;
|
||||
background: #568;
|
||||
border: 1px solid #457;
|
||||
}
|
||||
#header #search a.inactive {
|
||||
color: #999;
|
||||
}
|
||||
#search_frame {
|
||||
-webkit-box-shadow: #aaa -7px 5px 25px;
|
||||
box-shadow: #aaa -7px 5px 25px;
|
||||
display: none;
|
||||
position: absolute;
|
||||
overflow-y: scroll;
|
||||
z-index: 9999;
|
||||
top: 36px;
|
||||
right: 18px;
|
||||
width: 500px;
|
||||
height: 80%;
|
||||
background: #fff;
|
||||
border: 1px solid #999;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
.alphaindex {
|
||||
margin-top: 0;
|
||||
font-size: 22px;
|
||||
}
|
||||
.noborder {
|
||||
border-top: 0px;
|
||||
margin-top: 0;
|
||||
padding-top: 4px;
|
||||
}
|
||||
.title {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
#files {
|
||||
padding: 0;
|
||||
font-size: 1.1em;
|
||||
}
|
||||
#files li {
|
||||
list-style: none;
|
||||
display: inline;
|
||||
padding: 7px 12px;
|
||||
line-height: 35px;
|
||||
background: #f0f0f0;
|
||||
margin-right: 5px;
|
||||
}
|
||||
.index {
|
||||
-webkit-column-count: 3;
|
||||
-moz-column-count: 3;
|
||||
column-count: 3;
|
||||
-webkit-column-width: 33%;
|
||||
-moz-column-width: 33%;
|
||||
column-width: 33%;
|
||||
}
|
||||
.index > ul {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
padding-bottom: 10px;
|
||||
font-size: 1.1em;
|
||||
list-style: none;
|
||||
}
|
||||
.index > ul > li.letter {
|
||||
-webkit-column-break-after: avoid;
|
||||
font-size: 1.4em;
|
||||
padding-bottom: 10px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.index > ul > ul {
|
||||
margin: 0;
|
||||
padding-left: 20px;
|
||||
}
|
||||
.index > ul > ul small {
|
||||
color: #666;
|
||||
font-size: 0.7em;
|
||||
}
|
||||
body.list {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
body #content.list #search {
|
||||
position: relative;
|
||||
margin-top: 5px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
#content.list.tree > ul {
|
||||
margin-top: 13px !important;
|
||||
}
|
||||
#content.list.tree ul {
|
||||
font-size: 16px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
#content.list.tree ul li {
|
||||
margin: 0;
|
||||
padding: 5px;
|
||||
color: #000;
|
||||
font-size: 1em;
|
||||
list-style: none;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
cursor: pointer;
|
||||
}
|
||||
#content.list.tree ul li.namespace {
|
||||
overflow: visible;
|
||||
}
|
||||
#content.list.tree ul li > a.toggle {
|
||||
display: block;
|
||||
float: left;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
margin-top: 5px;
|
||||
margin-left: 5px;
|
||||
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAYAAABb0P4QAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAK8AAACvABQqw0mAAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAAVdEVYdENyZWF0aW9uIFRpbWUAMy8xNC8wOeNZPpQAAAE2SURBVDiNrZTBccIwEEXfelIAHUA6CZ24BGaWO+FuzZAK4k6gg5QAdGAq+Bxs2Yqx7BzyL7Llp/VfzZeQhCTc/ezuGzKKnKSzpCxXJM8fwNXda3df5RZETlIt6YUzSQDs93sl8w3wBZxCCE10GM1OcWbWjB2mWgEH4Mfdyxm3PSepBHibgQE2wLe7r4HjEidpnXMYdQPKEMJcsZ4zs2POYQOcaPfwMVOo58zsAdMt18BuoVDPxUJRacELbXv3hUIX2vYmOUvi8C8ydz/ThjXrqKqqLbDIAdsCKBd+Wo7GWa7o9qzOQHVVVXeAbs+yHHCH4aTsaCOQqunmUy1yBUAXkdMIfMlgF5EXLo2OpV/c/Up7jG4hhHcYLgWzAZXUc2b2ixsfvc/RmNNfOXD3Q/oeL9axJE1yT9IOoUu6MGUkAAAAAElFTkSuQmCC");
|
||||
background-repeat: no-repeat;
|
||||
background-position: 0px -10px;
|
||||
}
|
||||
#content.list.tree ul li > a.toggle.collapsed {
|
||||
background-position: 0px 0px;
|
||||
}
|
||||
#content.list.tree ul li > span,
|
||||
#content.list.tree ul li a {
|
||||
margin-left: 20px;
|
||||
text-decoration: none;
|
||||
}
|
||||
#content.list.tree ul li > a.toggle + span,
|
||||
#content.list.tree ul li a.toggle + a {
|
||||
margin-left: 5px;
|
||||
}
|
||||
#content.list.tree ul li small {
|
||||
color: #888;
|
||||
white-space: nowrap;
|
||||
}
|
||||
#content.list.tree ul li small.namespace {
|
||||
display: none;
|
||||
}
|
||||
#content.list.tree ul li.result a.toggle {
|
||||
visibility: hidden;
|
||||
}
|
||||
#content.list.tree ul li.result small.namespace {
|
||||
display: inline;
|
||||
}
|
||||
#content.list.tree ul li.result small.parent {
|
||||
display: none;
|
||||
}
|
||||
#content.list {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
#content.list h1 {
|
||||
padding: 12px 10px;
|
||||
padding-bottom: 10px;
|
||||
margin: 0;
|
||||
font-size: 1.4em;
|
||||
}
|
||||
#content.list a:hover {
|
||||
background: transparent;
|
||||
}
|
||||
#content.list nav {
|
||||
margin-left: 10px;
|
||||
}
|
||||
#content.list #search {
|
||||
color: #888;
|
||||
}
|
||||
#content.list #search input {
|
||||
-webkit-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
border: 1px solid #bbb;
|
||||
}
|
||||
#content.list a {
|
||||
color: #05a;
|
||||
cursor: pointer;
|
||||
text-decoration: none;
|
||||
}
|
||||
#content.list a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
#content.list ul {
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
margin-left: 0;
|
||||
}
|
||||
#content.list ul li[deprecated] {
|
||||
text-decoration: line-through;
|
||||
}
|
||||
#content.list ul li {
|
||||
padding: 5px;
|
||||
padding-left: 12px;
|
||||
margin: 0;
|
||||
font-size: 1.1em;
|
||||
list-style: none;
|
||||
color: #888;
|
||||
cursor: pointer;
|
||||
}
|
||||
#content.list ul li.stripe {
|
||||
background: #f0f0f0;
|
||||
}
|
||||
#content.list ul li:hover {
|
||||
background: #ddd;
|
||||
}
|
||||
nav.toc {
|
||||
-webkit-box-shadow: #bbb -2px 2px 6px;
|
||||
box-shadow: #bbb -2px 2px 6px;
|
||||
overflow: hidden;
|
||||
float: right;
|
||||
z-index: 500;
|
||||
right: 0px;
|
||||
max-width: 300px;
|
||||
padding: 20px;
|
||||
padding-right: 30px;
|
||||
margin-left: 20px;
|
||||
margin-bottom: 20px;
|
||||
background: #fff;
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
nav.toc p.title {
|
||||
margin-top: 5px;
|
||||
}
|
||||
nav.toc ol {
|
||||
padding-left: 1.8em;
|
||||
}
|
||||
nav.toc li {
|
||||
font-size: 1.1em;
|
||||
line-height: 1.7em;
|
||||
}
|
||||
nav.toc > ol > li {
|
||||
font-size: 1.1em;
|
||||
font-weight: bold;
|
||||
}
|
||||
nav.toc ol > ol {
|
||||
font-size: 0.9em;
|
||||
}
|
||||
nav.toc.inline {
|
||||
-webkit-box-shadow: #fff 0px 0px 0px;
|
||||
box-shadow: #fff 0px 0px 0px;
|
||||
position: relative;
|
||||
float: none;
|
||||
padding: 0;
|
||||
margin: 5px 0 0 0;
|
||||
border: 0px;
|
||||
}
|
||||
nav.toc.inline.hidden {
|
||||
background: none;
|
||||
padding: 0;
|
||||
text-align: left;
|
||||
}
|
||||
nav.toc.hidden {
|
||||
height: 26px;
|
||||
width: 140px;
|
||||
padding: 5px;
|
||||
background: #f6f6f6;
|
||||
text-align: center;
|
||||
}
|
||||
nav.toc.hidden p.title small {
|
||||
display: none;
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Module>
|
||||
<ModulePrefs title="Video upload" description="Upload videos in Sevianno" author="Kevin Jahns, Chair of Computer Science 5, RWTH Aachen University, Germany" author_email="jahns@dbis.rwth-aachen.de" scrolling="true">
|
||||
<Require feature="dynamic-height"/>
|
||||
|
||||
</ModulePrefs>
|
||||
|
||||
<Content type="html"><![CDATA[
|
||||
<script src="http://open-app.googlecode.com/files/openapp.js"></script>
|
||||
<script src="http://dbis.rwth-aachen.de/gadgets/iwc/lib/iwc.js"></script>
|
||||
<script src="http://dbis.rwth-aachen.de/~jahns/role-widgets/widgetbundles/libraries/DUIClient.js"></script>
|
||||
<script src="../../build/browser/Frameworks/JsonFramework.min.js"></script>
|
||||
<script src="../../build/browser/Connectors/IwcConnector.min.js"></script>
|
||||
<script src="./index.js"></script>
|
||||
<h1> Collaborative Json Widget </h1>
|
||||
]]></Content>
|
||||
</Module>
|
||||
@@ -1,74 +0,0 @@
|
||||
## IWC + JSON Example
|
||||
Here, I will give a short overview on how to use the IwcJson Framework in Role-SDK widgets.
|
||||
First you have to include the following libraries in your widget file:
|
||||
```
|
||||
<script src="http://open-app.googlecode.com/files/openapp.js"></script>
|
||||
<script src="http://dbis.rwth-aachen.de/gadgets/iwc/lib/iwc.js"></script>
|
||||
<script src="http://dbis.rwth-aachen.de/~jahns/role-widgets/widgetbundles/libraries/DUIClient.js"></script>
|
||||
<script src="../../build/browser/Frameworks/JsonFramework.min.js"></script>
|
||||
<script src="../../build/browser/Connectors/IwcConnector.min.js"></script>
|
||||
<script src="./index.js"></script>
|
||||
```
|
||||
A working widget implementation is [IwcJson.xml](./IwcJson.xml) and the js-file is [index.js](./index.js)
|
||||
|
||||
|
||||
```js
|
||||
function init(){
|
||||
Y.createIwcConnector(function(Connector, user_id){
|
||||
```
|
||||
|
||||
|
||||
yatta is the shared json object. If you change something on this object,
|
||||
it will be instantly shared with all the other collaborators.
|
||||
|
||||
|
||||
```js
|
||||
yatta = new Y.JsonYatta(user_id, Connector);
|
||||
```
|
||||
|
||||
|
||||
You may want to get the created DUI client (you must not create two DUI/IWC clients!!),
|
||||
or set an IwcHandler.
|
||||
|
||||
|
||||
```js
|
||||
var duiclient = yatta.getConnector().duiclient;
|
||||
function iwcHandler (intent) {
|
||||
console.log("Received intent: "+JSON.stringify(intent));
|
||||
}
|
||||
yatta.getConnector().setIwcHandler(iwcHandler);
|
||||
```
|
||||
|
||||
|
||||
Add a integer-property like this
|
||||
|
||||
|
||||
```js
|
||||
yatta.val('x', 7);
|
||||
```
|
||||
|
||||
|
||||
Get the value of property x like this
|
||||
|
||||
|
||||
```js
|
||||
console.log(yatta.val('x') === 7); // true
|
||||
```
|
||||
|
||||
|
||||
A string property can be either mutable or immutable.
|
||||
|
||||
|
||||
```js
|
||||
yatta.val('mutable_string', "text", "mutable");
|
||||
yatta.val('immutable_string', "text", "immutable");
|
||||
|
||||
console.log(yatta.val('immutable_string') === "text"); // true
|
||||
yatta.val('mutable_string').insertText(2,"XXX"); // position, string
|
||||
yatta.val('mutable_string').deleteText(0,1); // position, deletion length
|
||||
console.log(yatta.val('mutable_string').val() === "eXXXxt"); // true
|
||||
|
||||
})
|
||||
}
|
||||
window.onload = init
|
||||
```
|
||||
@@ -1,57 +0,0 @@
|
||||
|
||||
/**
|
||||
## IWC + JSON Example
|
||||
Here, I will give a short overview on how to use the IwcJson Framework in Role-SDK widgets.
|
||||
First you have to include the following libraries in your widget file:
|
||||
```
|
||||
<script src="http://open-app.googlecode.com/files/openapp.js"></script>
|
||||
<script src="http://dbis.rwth-aachen.de/gadgets/iwc/lib/iwc.js"></script>
|
||||
<script src="http://dbis.rwth-aachen.de/~jahns/role-widgets/widgetbundles/libraries/DUIClient.js"></script>
|
||||
<script src="../../build/browser/Frameworks/JsonFramework.min.js"></script>
|
||||
<script src="../../build/browser/Connectors/IwcConnector.min.js"></script>
|
||||
<script src="./index.js"></script>
|
||||
```
|
||||
A working widget implementation is [IwcJson.xml](./IwcJson.xml) and the js-file is [index.js](./index.js)
|
||||
*/
|
||||
function init(){
|
||||
Y.createIwcConnector(function(Connector, user_id){
|
||||
/**
|
||||
yatta is the shared json object. If you change something on this object,
|
||||
it will be instantly shared with all the other collaborators.
|
||||
*/
|
||||
yatta = new Y.JsonYatta(user_id, Connector);
|
||||
|
||||
/**
|
||||
You may want to get the created DUI client (you must not create two DUI/IWC clients!!),
|
||||
or set an IwcHandler.
|
||||
*/
|
||||
var duiclient = yatta.getConnector().duiclient;
|
||||
function iwcHandler (intent) {
|
||||
console.log("Received intent: "+JSON.stringify(intent));
|
||||
}
|
||||
yatta.getConnector().setIwcHandler(iwcHandler);
|
||||
|
||||
/**
|
||||
Add a integer-property like this
|
||||
*/
|
||||
yatta.val('x', 7);
|
||||
|
||||
/**
|
||||
Get the value of property x like this
|
||||
*/
|
||||
console.log(yatta.val('x') === 7); // true
|
||||
|
||||
/**
|
||||
A string property can be either mutable or immutable.
|
||||
*/
|
||||
yatta.val('mutable_string', "text", "mutable");
|
||||
yatta.val('immutable_string', "text", "immutable");
|
||||
|
||||
console.log(yatta.val('immutable_string') === "text"); // true
|
||||
yatta.val('mutable_string').insertText(2,"XXX"); // position, string
|
||||
yatta.val('mutable_string').deleteText(0,1); // position, deletion length
|
||||
console.log(yatta.val('mutable_string').val() === "eXXXxt"); // true
|
||||
|
||||
})
|
||||
}
|
||||
window.onload = init
|
||||
@@ -1,31 +0,0 @@
|
||||
## IWC + JSON Example
|
||||
Here, I will give a short overview on how to use the IwcJson Framework in Role-SDK widgets.
|
||||
First you have to include the following libraries in your widget file:
|
||||
```
|
||||
<script src="http://open-app.googlecode.com/files/openapp.js"></script>
|
||||
<script src="http://dbis.rwth-aachen.de/gadgets/iwc/lib/iwc.js"></script>
|
||||
<script src="http://dbis.rwth-aachen.de/~jahns/role-widgets/widgetbundles/libraries/DUIClient.js"></script>
|
||||
<script src="../../build/browser/Frameworks/JsonFramework.min.js"></script>
|
||||
<script src="../../build/browser/Connectors/IwcConnector.min.js"></script>
|
||||
<script src="./index.js"></script>
|
||||
```
|
||||
A working widget implementation is [IwcJson.xml](./IwcJson.xml) and the js-file is [index.js](./index.js)
|
||||
|
||||
|
||||
```js
|
||||
function init(){
|
||||
Y.createIwcConnector(function(Connector, user_id){
|
||||
```
|
||||
|
||||
|
||||
You don't have to use the proposed user_id.
|
||||
|
||||
|
||||
```js
|
||||
console.log("me is number 2")
|
||||
yatta = new Y.JsonYatta(2, Connector);
|
||||
|
||||
})
|
||||
}
|
||||
window.onload = init
|
||||
```
|
||||
@@ -1,32 +0,0 @@
|
||||
|
||||
/**
|
||||
## IWC + JSON Example
|
||||
Here, I will give a short overview on how to use the IwcJson Framework in Role-SDK widgets.
|
||||
First you have to include the following libraries in your widget file:
|
||||
```
|
||||
<script src="http://open-app.googlecode.com/files/openapp.js"></script>
|
||||
<script src="http://dbis.rwth-aachen.de/gadgets/iwc/lib/iwc.js"></script>
|
||||
<script src="http://dbis.rwth-aachen.de/~jahns/role-widgets/widgetbundles/libraries/DUIClient.js"></script>
|
||||
<script src="../../build/browser/Frameworks/JsonFramework.min.js"></script>
|
||||
<script src="../../build/browser/Connectors/IwcConnector.min.js"></script>
|
||||
<script src="./index.js"></script>
|
||||
```
|
||||
A working widget implementation is [IwcJson.xml](./IwcJson.xml) and the js-file is [index.js](./index.js)
|
||||
*/
|
||||
function init(){
|
||||
Y.createIwcConnector(function(Connector, user_id){
|
||||
/**
|
||||
You don't have to use the proposed user_id.
|
||||
*/
|
||||
// console.log("me is number 1");
|
||||
// yatta = new JsonYatta(1, Connector);
|
||||
|
||||
/**
|
||||
Though, it is recommended to use the user_id
|
||||
*/
|
||||
yatta = new Y.JsonYatta(user_id, Connector);
|
||||
|
||||
|
||||
})
|
||||
}
|
||||
window.onload = init
|
||||
@@ -1,26 +0,0 @@
|
||||
|
||||
/**
|
||||
## IWC + JSON Example
|
||||
Here, I will give a short overview on how to use the IwcJson Framework in Role-SDK widgets.
|
||||
First you have to include the following libraries in your widget file:
|
||||
```
|
||||
<script src="http://open-app.googlecode.com/files/openapp.js"></script>
|
||||
<script src="http://dbis.rwth-aachen.de/gadgets/iwc/lib/iwc.js"></script>
|
||||
<script src="http://dbis.rwth-aachen.de/~jahns/role-widgets/widgetbundles/libraries/DUIClient.js"></script>
|
||||
<script src="../../build/browser/Frameworks/JsonFramework.min.js"></script>
|
||||
<script src="../../build/browser/Connectors/IwcConnector.min.js"></script>
|
||||
<script src="./index.js"></script>
|
||||
```
|
||||
A working widget implementation is [IwcJson.xml](./IwcJson.xml) and the js-file is [index.js](./index.js)
|
||||
*/
|
||||
function init(){
|
||||
Y.createIwcConnector(function(Connector, user_id){
|
||||
/**
|
||||
You don't have to use the proposed user_id.
|
||||
*/
|
||||
console.log("me is number 2")
|
||||
yatta = new Y.JsonYatta(2, Connector);
|
||||
|
||||
})
|
||||
}
|
||||
window.onload = init
|
||||
@@ -1,17 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Module>
|
||||
<ModulePrefs title="Video upload" description="Upload videos in Sevianno" author="Kevin Jahns, Chair of Computer Science 5, RWTH Aachen University, Germany" author_email="jahns@dbis.rwth-aachen.de" scrolling="true">
|
||||
<Require feature="dynamic-height"/>
|
||||
|
||||
</ModulePrefs>
|
||||
|
||||
<Content type="html"><![CDATA[
|
||||
<script src="http://open-app.googlecode.com/files/openapp.js"></script>
|
||||
<script src="http://dbis.rwth-aachen.de/gadgets/iwc/lib/iwc.js"></script>
|
||||
<script src="http://dbis.rwth-aachen.de/~jahns/role-widgets/widgetbundles/libraries/DUIClient.js"></script>
|
||||
<script src="../../build/browser/Connectors/IwcConnector.min.js"></script>
|
||||
<script src="../../build/browser/Frameworks/JsonFramework.min.js"></script>
|
||||
<script src="./index1.js"></script>
|
||||
<h1> Collaborative Json Widget 1</h1>
|
||||
]]></Content>
|
||||
</Module>
|
||||
@@ -1,17 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Module>
|
||||
<ModulePrefs title="Video upload" description="Upload videos in Sevianno" author="Kevin Jahns, Chair of Computer Science 5, RWTH Aachen University, Germany" author_email="jahns@dbis.rwth-aachen.de" scrolling="true">
|
||||
<Require feature="dynamic-height"/>
|
||||
|
||||
</ModulePrefs>
|
||||
|
||||
<Content type="html"><![CDATA[
|
||||
<script src="http://open-app.googlecode.com/files/openapp.js"></script>
|
||||
<script src="http://dbis.rwth-aachen.de/gadgets/iwc/lib/iwc.js"></script>
|
||||
<script src="http://dbis.rwth-aachen.de/~jahns/role-widgets/widgetbundles/libraries/DUIClient.js"></script>
|
||||
<script src="../../build/browser/Connectors/IwcConnector.min.js"></script>
|
||||
<script src="../../build/browser/Frameworks/JsonFramework.min.js"></script>
|
||||
<script src="./index2.js"></script>
|
||||
<h1> Collaborative Json Widget 2</h1>
|
||||
]]></Content>
|
||||
</Module>
|
||||
@@ -1,300 +0,0 @@
|
||||
## PeerJs + JSON Tutorial
|
||||
Here, I will give a short overview on how to enable collaborative json with the
|
||||
[PeerJs](http://peerjs.com/) Connector and the JsonYatta Framework. Open
|
||||
[index.html](http://dadamonad.github.io/Yatta/examples/PeerJs-Json/index.html) in your Browser and
|
||||
use the console to explore Yatta!
|
||||
|
||||
[PeerJs](http://peerjs.com) is a Framework that enables you to connect to other peers. You just need the
|
||||
user-id of the peer (browser/client). And then you can connect to it.
|
||||
|
||||
First you have to include the following libraries in your html file:
|
||||
```
|
||||
<script src="http://cdn.peerjs.com/0.3/peer.js"></script>
|
||||
<script src="../../build/browser/Frameworks/JsonFramework.js"></script>
|
||||
<script src="../../build/browser/Connectors/PeerJsConnector.js"></script>
|
||||
<script src="./index.js"></script>
|
||||
```
|
||||
### Create Connector
|
||||
|
||||
The PeerJs Framework requires an API key, or you need to set up your own PeerJs server.
|
||||
Get an API key from the [Website](http://peerjs.com/peerserver).
|
||||
The first parameter of `createPeerJsConnector` is forwarded as the options object in PeerJs.
|
||||
Therefore, you may also specify the server/port here, if you have set up your own server.
|
||||
|
||||
|
||||
```js
|
||||
var yatta, yattaHandler;
|
||||
Y.createPeerJsConnector({key: 'h7nlefbgavh1tt9'}, function(Connector, user_id){
|
||||
```
|
||||
|
||||
|
||||
You can also specify your own user_id with peerjs.
|
||||
But you have to make sure that no other client associated to your API-key has the same user_id.
|
||||
|
||||
|
||||
```js
|
||||
// Y.createPeerJsConnector("unique_id", {key: 'h7nlefbgavh1tt9'}, function(Connector, user_id){
|
||||
```
|
||||
|
||||
|
||||
### Yatta
|
||||
yatta is the shared json object. If you change something on this object,
|
||||
it will be instantly shared with all the other collaborators.
|
||||
|
||||
|
||||
```js
|
||||
yatta = new Y.JsonFramework(user_id, Connector);
|
||||
```
|
||||
|
||||
|
||||
Next, you may want to connect to another peer. Therefore you have to receive his
|
||||
user_id. If the other peer is connected to other peers, the PeerJsConnector
|
||||
will automatically connect to them too.
|
||||
|
||||
Transmitting the user_id is your job.
|
||||
See [TextEditing](../../examples/TextEditing/) for a nice example
|
||||
on how to do that with urls.
|
||||
|
||||
|
||||
```js
|
||||
console.log("This is your user-id: "+user_id);
|
||||
|
||||
// yatta.connector.connectToPeer(peer_user_id);
|
||||
```
|
||||
|
||||
|
||||
Add a integer-property like this
|
||||
|
||||
|
||||
```js
|
||||
yatta.val('x', 7);
|
||||
```
|
||||
|
||||
|
||||
Get the value of property x like this
|
||||
|
||||
|
||||
```js
|
||||
console.log(yatta.val('x') === 7); // true
|
||||
```
|
||||
|
||||
|
||||
A string property can be either mutable or immutable.
|
||||
|
||||
|
||||
```js
|
||||
yatta.val('mutable_string', "text", "mutable");
|
||||
yatta.val('immutable_string', "text", "immutable");
|
||||
|
||||
console.log(yatta.val('immutable_string') === "text"); // true
|
||||
yatta.val('mutable_string').insertText(2,"XXX"); // position, string
|
||||
yatta.val('mutable_string').deleteText(0,1); // position, deletion length
|
||||
console.log(yatta.val('mutable_string').val() === "eXXXxt"); // true
|
||||
```
|
||||
|
||||
|
||||
Did you recognize that we have to use anoter `.val()` for mutable strings?
|
||||
Thats because yatta.val('mutable_string') is of type WordType.
|
||||
Since we implemented `toString` in this for WordType's, you can use it like a string:
|
||||
|
||||
|
||||
```js
|
||||
console.log(""+yatta.val("mutable_string") === "eXXXxt") // true, concatenating it with a string will implicitly invoke toString()
|
||||
```
|
||||
|
||||
|
||||
You can omit the mutable - parameter. In that case the default will be used.
|
||||
Initially the default is 'mutable'. You can set it like this:
|
||||
|
||||
|
||||
```js
|
||||
yatta.setMutableDefault('mutable');
|
||||
// or
|
||||
yatta.setMutableDefault('immutable');
|
||||
|
||||
yatta.val('new_string', "string");
|
||||
console.log(yatta.val('new_string') === "string"); // true
|
||||
```
|
||||
|
||||
|
||||
yatta is chainable:
|
||||
|
||||
|
||||
```js
|
||||
yatta.val('a', 4).val('b',5);
|
||||
console.log(yatta.val('a') === 4); // true
|
||||
console.log(yatta.val('b') === 5); // true
|
||||
```
|
||||
|
||||
|
||||
You can alse set objects.
|
||||
|
||||
|
||||
```js
|
||||
yatta.val('object', {a : {b : "b"}, c : { d : 5 }});
|
||||
console.log(yatta.val('object').val('c').val('d') === 5); // true
|
||||
```
|
||||
|
||||
|
||||
Lists are always immutable.
|
||||
|
||||
|
||||
```js
|
||||
yatta.val('list', [1,2,3]);
|
||||
console.log(yatta.val('list')[2] === 3); // true
|
||||
```
|
||||
|
||||
|
||||
### Check Types
|
||||
Certainly you want to check types!
|
||||
|
||||
Here, we create a function that parses a Yatta type to a string.
|
||||
|
||||
|
||||
```js
|
||||
function show(o){
|
||||
if (o.type === "JsonType"){
|
||||
return JSON.stringify(o.toJson());
|
||||
} else if (o.type === "WordType") {
|
||||
return o.val();
|
||||
} else if (o.constructor === {}.constructor) { // It's an Object
|
||||
return JSON.stringify(o);
|
||||
} else { // It's a primitive data type (E.g. string, int)
|
||||
return o;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
### Add listeners
|
||||
Apply a 'addProperty' - listener to a JsonType.
|
||||
|
||||
|
||||
```js
|
||||
function addProperty(event_name, property_name){
|
||||
console.log("Property '" + property_name + "' was created!");
|
||||
console.log("Value: " + show(this.val(property_name))); // 'this' is the object on which the property was created.
|
||||
};
|
||||
yatta.on('addProperty', addProperty);
|
||||
yatta.val('new', {z: 7}); // Property 'new' was created!
|
||||
```
|
||||
|
||||
|
||||
Apply a 'change' - listener to a JsonType.
|
||||
|
||||
|
||||
```js
|
||||
function change(event_name, property_name){
|
||||
console.log("Value of property '" + property_name + "' changed!");
|
||||
console.log("New value: " + show(this.val(property_name)) + ""); // 'this' is the object on which the property changed.
|
||||
};
|
||||
yatta.on('change', change);
|
||||
yatta.val('mutable_string', "text", 'mutable'); // Property 'mutable_string' was replaced or changed!
|
||||
```
|
||||
|
||||
|
||||
'change' and 'addProperty' do also fire for nested properties.
|
||||
|
||||
|
||||
```js
|
||||
yatta.val('new').val('z', {'replace' : "x"}); // Property 'z' was replaced or changed!
|
||||
yatta.val('new').val('z').val('new', {"true": true}); // Property 'z' was replaced or changed! + Property 'new' was created!
|
||||
```
|
||||
|
||||
|
||||
Apply 'insert' and 'delete' - listeners to Words.
|
||||
|
||||
|
||||
```js
|
||||
function insert_delete(event_name, op){
|
||||
if (event_name === "insert"){
|
||||
console.log("Inserted '" + op.content + "' at position " + op.getPosition());
|
||||
} else if (event_name === "delete"){
|
||||
console.log("Deleted character at position " + op.getPosition());
|
||||
}
|
||||
};
|
||||
yatta.val('mutable_string').on(['insert', 'delete'], insert_delete);
|
||||
yatta.val('mutable_string').insertText(0, 'a'); // Inserted 'a' at position 0
|
||||
yatta.val('mutable_string').deleteText(0, 1); // Deleted character at position 0
|
||||
|
||||
yatta.deleteListener('addProperty', addProperty);
|
||||
yatta.deleteListener('change', change);
|
||||
yatta.val('mutable_string').deleteListener('insert_delete', insert_delete);
|
||||
```
|
||||
|
||||
|
||||
### Experimental method
|
||||
But there is a much more convenient way!
|
||||
|
||||
|
||||
```js
|
||||
console.log(yatta.value.list[2] === 3) // true
|
||||
yatta.value.list = [3,4,5]
|
||||
console.log(yatta.val('list')[2] === 5) // true
|
||||
yatta.value.object = {c : 4}
|
||||
console.log(yatta.value.object.c === 4) // true
|
||||
```
|
||||
|
||||
|
||||
The downside is that you are only allowed to overwrite existing properties.
|
||||
|
||||
|
||||
```js
|
||||
yatta.value.newProperty = "Awesome"
|
||||
console.log(yatta.value.newProperty !== "Awesome") // true, yatta.value.newProperty is undefined.
|
||||
```
|
||||
|
||||
|
||||
So, how do we create new properties?
|
||||
|
||||
|
||||
```js
|
||||
yatta.value = {newProperty : "Awesome"}
|
||||
console.log(yatta.value.newProperty === "Awesome") // true, it's awesome ;)
|
||||
```
|
||||
|
||||
|
||||
This is stupid! I need to create new properties!
|
||||
Very well.. The solution is that we merge yatta.value with the new assignment.
|
||||
For example: assuming we want to overwrite yatta.value with some object o.
|
||||
Then these two rules apply:
|
||||
* The result has all properties of o
|
||||
* The result has all properties of yatta.value if they don't occur under the same property-name in o
|
||||
|
||||
|
||||
```js
|
||||
yatta.value = {newProperty : {Awesome : true }}
|
||||
console.log(yatta.value.list[2] === 5) // true, old value list still exists.
|
||||
console.log(yatta.value.newProperty.Awesome === true) // true, newProperty is overwritten.
|
||||
```
|
||||
|
||||
|
||||
Consider this case.
|
||||
|
||||
|
||||
```js
|
||||
yatta.value = {newProperty : { x : 4} }
|
||||
console.log(yatta.value.newProperty.Awesome == null) // true, newProperty was replaced, therefore it is now undefined
|
||||
```
|
||||
|
||||
|
||||
Did you notice that you always set immutable objects if you set properties like this?
|
||||
Even if the default is 'mutable'. If you want to work with mutable objects you have to work with .val().
|
||||
|
||||
One last thing. You are only allowed to set properties like this `yatta.value = o`.
|
||||
Yatta can't observe if you overwrite object references `yatta = "Awesome"`.
|
||||
|
||||
|
||||
```js
|
||||
w = yatta.value.newProperty
|
||||
w = "Awesome"
|
||||
console.log(yatta.value.newProperty !== "Awesome") // true, still not awesome..
|
||||
```
|
||||
|
||||
|
||||
Please also read [JsonWrapper](https://rawgit.com/DadaMonad/Yatta/master/doc/class/JsonWrapper.html)
|
||||
|
||||
|
||||
```js
|
||||
});
|
||||
```
|
||||
@@ -1,21 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset=utf-8 />
|
||||
<title>PeerJs Json Example</title>
|
||||
<script src="http://cdn.peerjs.com/0.3/peer.js"></script>
|
||||
<script src="../../build/browser/Frameworks/JsonFramework.js"></script>
|
||||
<script src="../../build/browser/Connectors/PeerJsConnector.js"></script>
|
||||
<script src="./index.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1> PeerJs + Json Tutorial</h1>
|
||||
<p> Collaborative Json editing with <a href="https://github.com/DadaMonad/Yatta/">Yatta</a>
|
||||
and <a href="http://peerjs.com/">PeerJs</a> (WebRTC). </p>
|
||||
|
||||
|
||||
<p> <a href="https://github.com/DadaMonad/Yatta/">Yatta</a> is a Framework for Real-Time collaboration on arbitrary data structures.
|
||||
You can find the code for this example <a href="https://github.com/DadaMonad/Yatta/tree/master/examples/PeerJs-Json">here</a>.
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,239 +0,0 @@
|
||||
|
||||
/**
|
||||
## PeerJs + JSON Example
|
||||
Here, I will give a short overview on how to enable collaborative json with the
|
||||
[PeerJs](http://peerjs.com/) Connector and the Json Framework. Open
|
||||
[index.html](http://dadamonad.github.io/Yatta/examples/PeerJs-Json/index.html) in your Browser and
|
||||
use the console to explore Yatta!
|
||||
|
||||
[PeerJs](http://peerjs.com) is a Framework that enables you to connect to other peers. You just need the
|
||||
user-id of the peer (browser/client). And then you can connect to it.
|
||||
|
||||
First you have to include the following libraries in your html file:
|
||||
```
|
||||
<script src="http://cdn.peerjs.com/0.3/peer.js"></script>
|
||||
<script src="../../build/browser/Frameworks/JsonFramework.js"></script>
|
||||
<script src="../../build/browser/Connectors/PeerJsConnector.js"></script>
|
||||
<script src="./index.js"></script>
|
||||
```
|
||||
### Create Connector
|
||||
|
||||
The PeerJs Framework requires an API key, or you need to set up your own PeerJs server.
|
||||
Get an API key from the [Website](http://peerjs.com/peerserver).
|
||||
The first parameter of `createPeerJsConnector` is forwarded as the options object in PeerJs.
|
||||
Therefore, you may also specify the server/port here, if you have set up your own server.
|
||||
*/
|
||||
var yatta, yattaHandler;
|
||||
Y.createPeerJsConnector({key: 'h7nlefbgavh1tt9'}, function(Connector, user_id){
|
||||
|
||||
/**
|
||||
You can also specify your own user_id with peerjs.
|
||||
But then you have to make sure that no other client associated to your API-key has the same user_id.
|
||||
```
|
||||
Y.createPeerJsConnector("unique_id", {key: 'h7nlefbgavh1tt9'}, function(Connector, user_id){
|
||||
```
|
||||
*/
|
||||
|
||||
/**
|
||||
### Yatta
|
||||
yatta is the shared json object. If you change something on this object,
|
||||
it will be instantly shared with all the other collaborators.
|
||||
*/
|
||||
yatta = new Y.JsonFramework(user_id, Connector);
|
||||
|
||||
/**
|
||||
Next, you may want to connect to another peer. Therefore you have to receive his
|
||||
user_id. If the other peer is connected to other peers, the PeerJsConnector
|
||||
will automatically connect to them too.
|
||||
|
||||
Transmitting the user_id is your job.
|
||||
See [TextEditing](../../examples/TextEditing/) for a nice example
|
||||
on how to do that with urls.
|
||||
*/
|
||||
console.log("Copy your user-id: " + user_id);
|
||||
|
||||
// yatta.connector.connectToPeer(peer_user_id);
|
||||
|
||||
/**
|
||||
Add a integer-property like this
|
||||
*/
|
||||
yatta.val('x', 7);
|
||||
|
||||
/**
|
||||
Get the value of property x like this
|
||||
*/
|
||||
console.log(yatta.val('x') === 7); // true
|
||||
|
||||
/**
|
||||
A string property can be either mutable or immutable.
|
||||
*/
|
||||
yatta.val('mutable_string', "text", "mutable");
|
||||
yatta.val('immutable_string', "text", "immutable");
|
||||
|
||||
console.log(yatta.val('immutable_string') === "text"); // true
|
||||
yatta.val('mutable_string').insertText(2,"XXX"); // position, string
|
||||
yatta.val('mutable_string').deleteText(0,1); // position, deletion length
|
||||
console.log(yatta.val('mutable_string').val() === "eXXXxt"); // true
|
||||
|
||||
/**
|
||||
Did you recognize that we use anoter `.val()` for mutable strings?
|
||||
Thats because `yatta.val('mutable_string')` is of type *WordType*.
|
||||
Since WordType implements `toString`, you can use it like a string:
|
||||
*/
|
||||
console.log("" + yatta.val("mutable_string") === "eXXXxt") // true, concatenating it with a string will implicitly invoke toString()
|
||||
|
||||
/**
|
||||
You can omit the mutable - parameter. In that case the default will be used.
|
||||
Initially the default is 'mutable'. You can set it like this:
|
||||
*/
|
||||
yatta.setMutableDefault('mutable');
|
||||
// or
|
||||
yatta.setMutableDefault('immutable');
|
||||
|
||||
yatta.val('new_string', "string");
|
||||
console.log(yatta.val('new_string') === "string"); // true
|
||||
|
||||
/**
|
||||
Yatta is [chainable](http://schier.co/post/method-chaining-in-javascript):
|
||||
*/
|
||||
yatta.val('a', 4).val('b',5);
|
||||
console.log(yatta.val('a') === 4); // true
|
||||
console.log(yatta.val('b') === 5); // true
|
||||
|
||||
/**
|
||||
You can alse set objects.
|
||||
*/
|
||||
yatta.val('object', {a : {b : "b"}, c : { d : 5 }});
|
||||
console.log(yatta.val('object').val('c').val('d') === 5); // true
|
||||
|
||||
/**
|
||||
Lists are always immutable.
|
||||
*/
|
||||
yatta.val('list', [0,1,2]);
|
||||
console.log(yatta.val('list')[2] === 2); // true
|
||||
|
||||
/**
|
||||
### Check Types
|
||||
Certainly you want to check types!
|
||||
You get the type of an YattaType with the `.type` property.
|
||||
|
||||
Here, we create a function that parses a Yatta type to a string.
|
||||
*/
|
||||
function show(o){
|
||||
if (o.type === "JsonType"){
|
||||
return JSON.stringify(o.toJson());
|
||||
} else if (o.type === "WordType") {
|
||||
return o.val();
|
||||
} else if (o.constructor === {}.constructor) { // It's an Object
|
||||
return JSON.stringify(o);
|
||||
} else { // It's a primitive data type (E.g. string, int)
|
||||
return o;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
### Add listeners
|
||||
Apply a 'addProperty' - listener to a JsonType.
|
||||
*/
|
||||
function addProperty(event_name, property_name){
|
||||
console.log("Property '" + property_name + "' was created!");
|
||||
console.log("Value: " + show(this.val(property_name))); // 'this' is the object on which the property was created.
|
||||
};
|
||||
yatta.on('addProperty', addProperty);
|
||||
yatta.val('new', {z: 7}); // Property 'new' was created!
|
||||
|
||||
/**
|
||||
Apply a 'change' - listener to a JsonType.
|
||||
*/
|
||||
function change(event_name, property_name){
|
||||
console.log("Value of property '" + property_name + "' changed!");
|
||||
console.log("New value: " + show(this.val(property_name)) + ""); // 'this' is the object on which the property changed.
|
||||
};
|
||||
yatta.on('change', change);
|
||||
yatta.val('mutable_string', "text", 'mutable'); // Property 'mutable_string' was replaced or changed!
|
||||
|
||||
/**
|
||||
'change' and 'addProperty' do also fire for nested properties.
|
||||
*/
|
||||
yatta.val('new').val('z', {'replace' : "x"}); // Property 'z' was replaced or changed!
|
||||
yatta.val('new').val('z').val('new', {"true": true}); // Property 'z' was replaced or changed! + Property 'new' was created!
|
||||
|
||||
/**
|
||||
Apply 'insert' and 'delete' - listeners to Words.
|
||||
*/
|
||||
function insert_delete(event_name, op){
|
||||
if (event_name === "insert"){
|
||||
console.log("Inserted '" + op.content + "' at position " + op.getPosition());
|
||||
} else if (event_name === "delete"){
|
||||
console.log("Deleted character at position " + op.getPosition());
|
||||
}
|
||||
};
|
||||
yatta.val('mutable_string').on(['insert', 'delete'], insert_delete);
|
||||
yatta.val('mutable_string').insertText(0, 'a'); // Inserted 'a' at position 0
|
||||
yatta.val('mutable_string').deleteText(0, 1); // Deleted character at position 0
|
||||
|
||||
yatta.deleteListener('addProperty', addProperty);
|
||||
yatta.deleteListener('change', change);
|
||||
yatta.val('mutable_string').deleteListener('insert_delete', insert_delete);
|
||||
|
||||
|
||||
/**
|
||||
### Experimental method
|
||||
Nah.. this is only for the cool kids.
|
||||
*/
|
||||
console.log(yatta.value.list[2] === 3) // true
|
||||
yatta.value.list = [3,4,5]
|
||||
console.log(yatta.val('list')[2] === 5) // true
|
||||
yatta.value.object = {c : 4}
|
||||
console.log(yatta.value.object.c === 4) // true
|
||||
|
||||
/**
|
||||
How did I do that? ^^
|
||||
|
||||
In Javascript it is possible set setter- and getter- for properties. This is
|
||||
why this method feels much more natural.
|
||||
The downside is that you are only allowed to overwrite existing properties.
|
||||
*/
|
||||
yatta.value.newProperty = "Awesome"
|
||||
console.log(yatta.value.newProperty !== "Awesome") // true, yatta.value.newProperty is undefined.
|
||||
|
||||
/**
|
||||
So, how do we create new properties?
|
||||
*/
|
||||
yatta.value = {newProperty : "Awesome"}
|
||||
console.log(yatta.value.newProperty === "Awesome") // true, it's awesome ;)
|
||||
|
||||
/**
|
||||
This is stupid! I don't want to overwrite all my existing properties!
|
||||
Very well.. The solution is that we merge yatta.value with the new assignment.
|
||||
For example: assuming we want to overwrite yatta.value with some object o.
|
||||
Then these two rules apply:
|
||||
* The result has all properties of o
|
||||
* The result has all properties of yatta.value if they don't occur under the same property-name in o
|
||||
*/
|
||||
yatta.value = {newProperty : {Awesome : true }}
|
||||
console.log(yatta.value.list[2] === 5) // true, old value list still exists.
|
||||
console.log(yatta.value.newProperty.Awesome === true) // true, newProperty is overwritten.
|
||||
|
||||
/**
|
||||
Consider this case.
|
||||
*/
|
||||
yatta.value = {newProperty : { x : 4} }
|
||||
console.log(yatta.value.newProperty.Awesome == null) // true, newProperty was replaced, therefore it is now undefined
|
||||
|
||||
/**
|
||||
Did you notice that you always set immutable objects if you set properties like this?
|
||||
Even if the default is 'mutable'. If you want to work with mutable objects you have to work with .val().
|
||||
|
||||
One last thing. You are only allowed to set properties like this `yatta.value = o`.
|
||||
Yatta can't observe if you overwrite object references `yatta = "Awesome"`.
|
||||
*/
|
||||
w = yatta.value.newProperty
|
||||
w = "Awesome"
|
||||
console.log(yatta.value.newProperty !== "Awesome") // true, still not awesome..
|
||||
|
||||
/**
|
||||
Please also read [JsonWrapper](https://rawgit.com/DadaMonad/Yatta/master/doc/class/JsonWrapper.html).
|
||||
I really want to hear what you think about this method :)
|
||||
*/
|
||||
});
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user