Skip to content

Commit

Permalink
open sketch offline
Browse files Browse the repository at this point in the history
  • Loading branch information
ramvibhakar committed Aug 19, 2015
1 parent abcf6b7 commit 9ba2d02
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion KSKInterface/src/sg/edu/smu/ksketch2/KSketchGlobals.as
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ package sg.edu.smu.ksketch2
public static function setView():void
{

if(Capabilities.playerType != "PlugIn" && Capabilities.playerType != "Desktop")
if(Capabilities.playerType != "PlugIn")// && Capabilities.playerType != "Desktop")
{
if(Capabilities.screenResolutionX > Capabilities.screenResolutionY)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,18 @@ package sg.edu.smu.ksketch2.canvas.controls
}
}
}
} else {
var arr:Array = cachedDocuments;
if(arr !=null){
for(var i:int=0;i<arr.length;i++){
if(arr[i].sketchId == _selectedSketch[1]){
sketchData = new KSketch_DataListItem(arr[i].fileData, arr[i].fileName, arr[i].originalName,
arr[i].owner_id, arr[i].modified, arr[i].changeDescription,
arr[i].sketchId, int(arr[i].version));
_homeView.displaySketchData(sketchData, _selectedSketch);
}
}
}
}
}
}
Expand Down Expand Up @@ -280,6 +292,7 @@ package sg.edu.smu.ksketch2.canvas.controls
sketchData = new KSketch_DataListItem(resultObj.data.fileData, resultObj.data.fileName, resultObj.data.originalName,
resultObj.data.owner_id, resultObj.modified, resultObj.data.changeDescription,
resultObj.data.sketchId, resultObj.data.version);
updateCache(resultObj.data);
}

_homeView.displaySketchData(sketchData, _selectedSketch);
Expand All @@ -300,6 +313,18 @@ package sg.edu.smu.ksketch2.canvas.controls
}
}
}
} else {
var arr:Array = cachedDocuments;
if(arr !=null){
for(var i:int=0;i<arr.length;i++){
if(arr[i].sketchId == _selectedSketch[1]){
sketchData = new KSketch_DataListItem(arr[i].fileData, arr[i].fileName, arr[i].originalName,
arr[i].owner_id, arr[i].modified, arr[i].changeDescription,
arr[i].sketchId, int(arr[i].version));
_homeView.displaySketchData(sketchData, _selectedSketch);
}
}
}
}
}

Expand Down

0 comments on commit 9ba2d02

Please sign in to comment.