Skip to content
Open
Show file tree
Hide file tree
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 @@ -69,6 +69,10 @@ define([
});
}
});
},

onScaleChange: function(scale) {
this.scale = scale;
}
});

Expand Down
15 changes: 13 additions & 2 deletions dahu/core/app/scripts/views/workspace/screen.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ define([
MouseView,
TooltipView,
// templates
screenTemplate){
screenTemplate
) {

/**
* Workspace screen view
Expand All @@ -56,6 +57,13 @@ define([
// so that we can render the collection as children
// of this parent node
this.collection = this.screencast.model.getScreenById(this.screenId).get('objects');

// we save the value to update the new tooltips
this.lastScaleFactor = 1.0;
},

onAddChild: function(view) {
view.triggerMethod("scale:change", this.lastScaleFactor);
},

// We select the ChildView depending on the object type.
Expand All @@ -72,6 +80,7 @@ define([
onShow: function() {
// setup UI
//@remove var ctrl = reqres.request('app:screencast:controller');
var self = this;

this.$('.container').css({
//@remove width: ctrl.getScreencastWidth(),
Expand All @@ -88,8 +97,10 @@ define([
}, function( transform, element ) {
// scale the workspace
fit.cssTransform(transform, element);
// we save the value to update the new tooltips
self.lastScaleFactor = transform.scale;
// notify listener that workspace was scaled
events.trigger('app:workspace:onScaleChanged', transform.scale);
events.trigger('app:workspace:onScaleChanged', self.lastScaleFactor);
});
},

Expand Down
1 change: 1 addition & 0 deletions dahu/core/app/styles/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ html, body {
height: 100%;

.container {
position: relative;
// reset padding and margin added by bootstrap
padding: 0px;
margin: 0px;
Expand Down