Created
June 30, 2016 21:31
-
-
Save bfgeek/a4ca5e42f7e379c2b4009ca71e6ae296 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
registerLayout('my-grid-layout', class { | |
static inputProperties = [/* etc */]; | |
constructor() { | |
this.grid = []; // Place items on a cached grid so don't have to recompute each layout call. | |
} | |
addRemoveChildren(addRemoveList) { | |
// Rebuild grid now, only occurs when child list changes. | |
for (let i = 0; i < addRemoveList.length; i++) { | |
this.grid[m][n] = child; | |
} | |
} | |
layout(constraintSpace, breakToken, etc) { | |
// Actually perform layout on the grid for the given constraint space. | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment