Skip to content

Commit

Permalink
am facut zoom-ul sa mearga
Browse files Browse the repository at this point in the history
  • Loading branch information
colin-dumitru committed Jan 25, 2012
1 parent 32279f7 commit 88582b5
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
Binary file modified WebServer/App_Data/WebServerDatabase.mdf
Binary file not shown.
Binary file modified WebServer/App_Data/WebServerDatabase_log.LDF
Binary file not shown.
2 changes: 1 addition & 1 deletion WebServer/Content/Timeline.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ div.tooltip ul li {list-style:none; cursor: pointer; margin:1px; background:#BBD
h2 {margin-top:30px;}
div#situation {min-height:400px}

#canvasDiv{background:#DDDDEE; -moz-border-radius: 14px;border-radius: 14px; }
#canvasDiv{background:#DDDDEE; -moz-border-radius: 14px;border-radius: 14px; height: 300px; overflow: auto; }
a.clustersBtn{display:block; float:right; margin:2px; font-size:16px; cursor:pointer; background:#DDDDDD; width: 22px; height:22px; -moz-border-radius: 100px; border-radius: 100px; text-align:center;}

/* generat */
Expand Down
13 changes: 7 additions & 6 deletions WebServer/Scripts/timeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ function loaded(xml) {
var bigger = $("<a class='clustersBtn nosel'>−</span>").click(function () {
if (clusterIndex + 1 < clusters.length) {
clusterIndex++;
drawSituations(situations, clusters[clusterIndex]);
drawSituations(situations, clusters[clusterIndex], clusterIndex);
}
});
var smaller = $("<a class='clustersBtn nosel'>+</span>").click(function () {
if (clusterIndex - 1 >= 0) {
clusterIndex--;
drawSituations(situations, clusters[clusterIndex]);
drawSituations(situations, clusters[clusterIndex], clusterIndex);
}
});
doc.append(bigger);
Expand All @@ -91,7 +91,7 @@ function loaded(xml) {

situations.sort(compare);

drawSituations(situations, clusters[clusterIndex]);
drawSituations(situations, clusters[clusterIndex], clusterIndex);
}

function drawCircle(context, x, y, r) {
Expand All @@ -101,15 +101,16 @@ function drawCircle(context, x, y, r) {
context.fill();
}

function drawSituations(situations, intervals) {
function drawSituations(situations, intervals, index) {
if (toolTip != null)
toolTip.remove();

var canvasDiv = $("#canvasDiv");
canvasDiv.empty();
canvasDiv.css({ padding: "10px" });
var canvasWidth = canvasDiv.width();
var canvasHeight = Math.ceil(canvasWidth / intervals);

var canvasHeight = canvasDiv.height() -20 ;
var canvasWidth = canvasDiv.width() * (index + 1);

var canvas = $("<canvas></canvas>").attr({ id: "canv", width: canvasWidth, height: canvasHeight });
canvasDiv.append(canvas);
Expand Down

0 comments on commit 88582b5

Please sign in to comment.