我有以下控制器代码:
<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()));
}
}
)
答案 0 :(得分:1)
您似乎在new Layer('<canvas...
doxytest.h
如果您添加该作业,您的代码应该有效。