osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GitHub] brooklyn-ui pull request #93: new layout (separable palette) tidies


Github user ahgittin commented on a diff in the pull request:

    https://github.com/apache/brooklyn-ui/pull/93#discussion_r229330825
  
    --- Diff: ui-modules/blueprint-composer/app/components/providers/palette-service.provider.js ---
    @@ -37,7 +37,9 @@ export function paletteServiceProvider() {
                 sections[id] = section;
             },
             deleteSection(id) {
    +            let old = sections[id];
                 delete sections[id];
    +            return old;
    --- End diff --
    
    if you want to change order a common pattern would be to delete it but put it to a local var so you could then add it in the right place.  same idea as `Map.remove`


---