Babelsberg/JS Demo World
Un-minimize any window. The ConverterExample and RegionExample are implementations of code examples from the ECOOP'14 paper Babelsberg/JS - A Browser-based Implementation of an Object Constraint Language. What they demonstrate is explained in their help texts. Click also on the links in the text to open ObjectEditors on relevant code. The other windows are further examples. Each window has a help button to explain what the example is about.
RegionExample
X

Menu
Circuits
X

Menu
ConverterExample
X

Menu
ColorGameZ3
X

Menu
sNAKE
X

Menu
Thermometer Demo
X

Menu
NaCLZ3
X

Menu
Z3Engine
X

Menu
Test Runner Layer
Disable Layer
ObjectEditor
X

Menu
ObjectEditor
X

Menu
TestRunner
X
M

users.timfelgentreff.layout.tests
Load module

users

timfelgentreff

babelsberg

src_transform

TransformTest

src_transform_test

TransformTest

tests

ConstraintTest

InteractionTest

PropagationTest

layout

tests

ChainOfSameExtentTest

ConstainedVariablesTest

testLayoutCompoundConstraintVariables

testbbbCompoundConstraintVariables

RecursiveUnconstraintTest

SameExtentTest

SimpleLayoutTest
Browse
Run
52 run, 0 failed
Reset
Bench
tests.js:ConstainedVariablesTest:-- all --:testLayoutCompoundConstraintVariables (proto)
X

Menu
N

...
../
layout.js (not parsed)
tests.js (not parsed)
-----
-----
-----
1
-----
X
>
<
layout.js
X

Menu
N

...
../
layout.js
tests.js (not parsed)
LayoutConstraint
LayoutConstraintBoxSameExtent
LayoutConstraintEqPt
LayoutConstraintVariable
LayoutConstraintVariableBox
LayoutConstraintVariableNumber
LayoutConstraintVariablePoint
LayoutConstraintVariableShape
LayoutObject
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
        },
        changed: function(bool) {
            if(arguments.length == 0) return this.__changed__;
            this.__changed__ = bool;
            // propagate changed flag upwards
            if(this.parentConstraintVariable && this.parentConstraintVariable instanceof LayoutConstraintVariable) {
                this.parentConstraintVariable.changed(bool)
            }
        },
        child: function(ivarnamechild) {
            if(arguments.length < 2)
                return this.__children__[ivarname];
            this.__children__[ivarname] = child;
            child.parentConstraintVariable = this;
        },
        
        // create a ConstrainedVariable for the property given by ivarname
        constrainProperty: function(ivarname) {
            var extentConstrainedVariable = ConstrainedVariable.newConstraintVariableFor(this.value, ivarname, this.__cvar__);
            if (Constraint.current) {
                extentConstrainedVariable.ensureExternalVariableFor(Constraint.current.solver);
                extentConstrainedVariable.addToConstraint(Constraint.current);
            }
            var childConstraintVariable = extentConstrainedVariable.externalVariables(this.solver);
            this.child(ivarname, childConstraintVariable);
            //console.log("FOOOOOO", ivarname, childConstraintVariable, this, childConstraintVariable.parentConstraintVariable);
            return extentConstrainedVariable;
X
>
<