Skip to content

Commit

Permalink
Merge pull request Samsung#289 from HunseopJeong/background
Browse files Browse the repository at this point in the history
Set the default size of the i3d element
  • Loading branch information
singa2000 authored Aug 27, 2019
2 parents 11bd46d + 66094ce commit 1534d7c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,7 @@ class AttributeInterative extends DressElement {
if (object.id === selectedId) {
if (designEditor) {
var model = designEditor.getModel();
var file = object.files.find(function(f) { return f.type === selectedType; });
model.updateAttribute(element.id, 'type', selectedType);
model.updateAttribute(element.id, 'src', path.join('i3d', 'models', selectedModel, selectedId, file.file));
if (selectedType === 'obj') {
var mtl = object.files.find(function(f) { return f.type === 'mtl' });
if (mtl) {
Expand All @@ -114,7 +112,7 @@ class AttributeInterative extends DressElement {
if (selectedIndex !== 0) {
var selectedOption = this.options.item(selectedIndex);
var modelID = selectedOption.getAttribute('i3d-model');

for (var model of models) {
if (model.id === modelID) {
objects = model.objects;
Expand Down Expand Up @@ -143,6 +141,7 @@ class AttributeInterative extends DressElement {
var file = objects[0].files.find(function(f) { return f.type === objects[0].type; });
model.updateAttribute(element.id, 'src', path.join('i3d', 'models', modelID, objects[0].id, file.file));
model.updateAttribute(element.id, 'i3d-model', modelID);
model.updateStyle(element.id, 'background', 'none');
}

modelContainer.show();
Expand Down
2 changes: 1 addition & 1 deletion tau-component-packages/components/i3d/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"type": "src"
}
},
"template": "<div class=\"ui-i3d\"></div>",
"template": "<div class=\"ui-i3d\" style=\"height: 200px; width: 200px; display:block; background:#cacaca\"></div>",
"resizable": true,
"draggable": true,
"new": true,
Expand Down

0 comments on commit 1534d7c

Please sign in to comment.