Get core specs passing w/ Telepath v0.14.0. Delete replication specs.

Telepath v0.14.0 is a ground-up rewrite of the replication library,
which is principally designed to support moving document fragments
within the overall document. But it's also a lot better in a number of
ways. This commit does the minimal to get things working on the new
telepath. Standard package specs don't pass yet. Also, I deleted the
replication specs since they are extremely convoluted and will be able
to be replaced with much better versions once I complete the changes
enabled by the new Telepath.
This commit is contained in:
Nathan Sobo
2013-10-30 11:27:33 -06:00
parent ca073fb7c2
commit 62ccf92a5d
18 changed files with 66 additions and 481 deletions

View File

@@ -17,16 +17,17 @@ class PaneAxis extends View
@state = site.createDocument(deserializer: @className(), children: [])
@addChild(child) for child in args
@state.get('children').on 'changed', ({index, inserted, removed, site}) =>
return if site is @state.site.id
for childState in removed
@state.get('children').on 'changed', ({index, insertedValues, removedValues, siteId}) =>
return if siteId is @state.siteId
for childState in removedValues
@removeChild(@children(":eq(#{index})").view(), updateState: false)
for childState, i in inserted
for childState, i in insertedValues
@addChild(deserialize(childState), index + i, updateState: false)
addChild: (child, index=@children().length, options={}) ->
@insertAt(index, child)
@state.get('children').insert(index, child.getState()) if options.updateState ? true
state = child.getState()
@state.get('children').insert(index, state) if options.updateState ? true
@getContainer()?.adjustPaneDimensions()
removeChild: (child, options={}) ->