function findRoot(obj) {
    while (obj.parent) {
        obj = obj.parent;
    }

    return obj;
}
/*
 * QML Material - An application framework implementing Material Design.
 *
 * Copyright (C) 2014-2016 Michael Spencer <sonrisesoftware@gmail.com>
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */
QML Material - An application framework implementing Material Design.
Copyright (C) 2014-2016 Michael Spencer 

This Source Code Form is subject to the terms of the Mozilla Public
License, v.
QML Material - An application framework implementing Material Design . Copyright ( C ) 2014 - 2016 Michael Spencer This Source Code Form is subject to the terms of the Mozilla Public License v .
function findRoot(obj) {
    while (obj.parent) {
        obj = obj.parent;
    }
    return obj;
}
function findRoot ( obj ) { while ( obj . parent ) { obj = obj . parent ; } return obj ; }
QML Material - An application framework implementing Material Design.
QML Material - An application framework implementing Material Design .