mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-27 08:28:50 +02:00
NICEEEeee have visualization function doing resizes
This commit is contained in:
parent
e412be9b61
commit
faa3a11434
2 changed files with 19 additions and 21 deletions
20
src/main.js
20
src/main.js
|
@ -18,7 +18,6 @@ $(document).ready(function(){
|
|||
el: $('#canvasWrapper')[0]
|
||||
});
|
||||
|
||||
// make the canvas for us
|
||||
if (/\?demo/.test(window.location.href)) {
|
||||
setTimeout(function() {
|
||||
events.trigger('submitCommandValueFromEvent', "gc; git checkout HEAD~1; git commit; git checkout -b bugFix; gc; gc; git rebase master; git checkout master; gc; gc; git merge bugFix");
|
||||
|
@ -47,22 +46,3 @@ function initUI() {
|
|||
$('#commandTextField').focus();
|
||||
}
|
||||
|
||||
function windowResize() {
|
||||
var smaller = 10;
|
||||
var el = $('#canvasWrapper')[0];
|
||||
|
||||
var left = el.offsetLeft;
|
||||
var top = el.offsetTop;
|
||||
var width = el.clientWidth - smaller;
|
||||
var height = el.clientHeight - smaller;
|
||||
|
||||
if (paper && paper.canvas) {
|
||||
$(paper.canvas).css({
|
||||
left: left + 'px',
|
||||
top: top + 'px'
|
||||
});
|
||||
paper.setSize(width, height);
|
||||
}
|
||||
events.trigger('canvasResize', width, height);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue