Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,19 @@
$scope.getMediaId = function (alias) {

if (editorState.current) {
var tabs = editorState.current.tabs;
var tabs = [];

if(editorState.current.variants) {
// V8 tabs from active variant
tabs = _.find(editorState.current.variants, function(v) {
return v.active;
}).tabs;
}
else {
// V7
tabs = editorState.current.tabs;
}

var id = null;
var prop = null;

Expand Down Expand Up @@ -57,7 +69,7 @@
var image = new Image();
image.src = $scope.imageSrc;

$(image).load(function () {
$(image).on('load', function () {

//set the height either from configuration or defaults
if ($scope.model.config.width && $scope.model.config.height) {
Expand Down Expand Up @@ -158,4 +170,4 @@
$scope.init();


});
});