使用ng-repeat添加多个画布

时间:2015-06-06 16:05:22

标签: javascript angularjs angularjs-ng-repeat

我有以下控制器代码:

    <div class="col-xs-8" style="width: 450px; height: 631px;">
    <div style="position: relative;" id="layerContainer" ng-repeat="layer in layers" ng-bind-html-unsafe="layer.canvas" >

    </div>
</div>

以及以下html:

   .imageElement{
    background-image: url("../resources/billede.png");
    background-repeat: no-repeat;
}

但是在运行时没有显示任何内容(类'imageElement'具有以下css:

void GamePlayScreen::update(float dt) {

phyWorld->Step(dt, 8, 1);

// Iterate over the bodies in the physics phyWorld
for (b2Body* b = phyWorld->GetBodyList(); b; b = b->GetNext()) {
    if (b->GetUserData() != NULL) {
        // Synchronize the AtlasSprites position and rotation with the corresponding body
        Sprite* sprActor = (Sprite*) b->GetUserData();

        sprActor->setPosition(b->GetPosition().x * PTM_RATIO,
                b->GetPosition().y * PTM_RATIO);

        sprActor->setRotation(-1 * CC_RADIANS_TO_DEGREES(b->GetAngle()));

    }
}

1 个答案:

答案 0 :(得分:1)

您似乎在new Layer('<canvas...

之前缺少doxytest.h

如果您添加该作业,您的代码应该有效。