LivelyKernel / lively4-core

A Self-supporting, Web-based Development Environment
https://lively-kernel.org/lively4/lively4-core/start.html
MIT License
74 stars 25 forks source link

Extract expandChild a to VivideObject #352

Open onsetsu opened 6 years ago

onsetsu commented 6 years ago

expandChild asynchronously fetches the child layer of a VivideObject.

Having a VivideView dynamically setting the expandChild method onto a widget, seems counterintuitive.

Instead, this method should be exposed by the VivideObject itself:

childLayer = await vivideObject.getChildren();

Also, a widget should not be in charge of setting the childLayer of a VivideObject:

object.childLayer = await this.expandChild(childData, childLayer.script);