renamed to yjs

This commit is contained in:
DadaMonad
2015-01-26 23:24:50 +00:00
parent d5c7d51dc4
commit 978203d73e
57 changed files with 83 additions and 54177 deletions

View File

@@ -2,14 +2,14 @@
<html>
<head>
<meta charset=utf-8 />
<title>Yatta+Polymer Example</title>
<title>Y Example</title>
<script src="../../../webcomponentsjs/webcomponents.min.js"></script>
<link rel="import" href="../../../polymer/polymer.html">
<link rel="import" href="yatta-test.html">
<link rel="import" href="y-test.html">
</head>
<body>
<yatta-test></yatta-test>
<y-test></y-test>
<script src="./index.js"></script>
</body>
</html>

View File

@@ -1,16 +1,16 @@
setTimeout(function(){
window.x = document.querySelector("yatta-test");
// x.yatta.HB.stopGarbageCollection();
x.yatta.val("stuff",{otherstuff:{nostuff:"this is no stuff"}})
window.y_test = document.querySelector("y-test");
window.y_test.y.val("stuff",{otherstuff:{nostuff:"this is no stuff"}})
setTimeout(function(){
var res = x.yatta.val("stuff");
if(!(x.nostuff === "this is no stuff")){
var res = y_test.y.val("stuff");
if(!(y_test.nostuff === "this is no stuff")){
console.log("Deep inherit doesn't work!")
}
window.y_stuff_property.val = {nostuff: "this is also no stuff"};
setTimeout(function(){
if(!(x.nostuff === "this is also no stuff")){
if(!(y_test.nostuff === "this is also no stuff")){
console.log("Element val overwrite doesn't work")
}
console.log("Everything is fine :)");

View File

@@ -1,38 +0,0 @@
<link rel="import" href="../../yatta-element.html">
<link rel="import" href="../../../Yatta-Connectors/xmpp-connector/xmpp-connector.html">
<link rel="import" href="../../../paper-slider/paper-slider.html">
<polymer-element name="yatta-test" attributes="yatta connector stuff">
<template>
<h1 id="text" contentEditable> Check this out !</h1>
<xmpp-connector id="connector" connector={{connector}} room="testy-xmpp-polymer"></xmpp-connector>
<yatta-element connector={{connector}} val={{yatta}}>
<yatta-property name="slider" val={{slider}}>
</yatta-property>
<yatta-property name="stuff" val={{stuff}}>
<yatta-property id="otherstuff" name="otherstuff" val={{otherstuff}}>
</yatta-property>
</yatta-property>
</yatta-element>
<yatta-element val={{otherstuff}}>
<yatta-property name="nostuff" val={{nostuff}}>
</yatta-property>
</yatta-element>
<paper-slider min="0" max="200" immediateValue={{slider}}></paper-slider>
</template>
<script>
Polymer({
ready: function(){
window.y_stuff_property = this.$.otherstuff;
this.yatta.val("slider",50)
var that = this;
this.connector.whenSynced(function(){
if(that.yatta.val("text") == null){
that.yatta.val("text","stuff","mutable");
}
that.yatta.val("text").bind(that.$.text,that.shadowRoot)
})
}
})
</script>
</polymer-element>