Skip to content

Commit

Permalink
ORA-650 fix simulation for IE -11, TODO find a better solution for sc…
Browse files Browse the repository at this point in the history
…aling 1.5

(cherry picked from commit 022ab79)
  • Loading branch information
bjost2s committed Oct 2, 2015
1 parent e323ef7 commit 89ee833
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 3 deletions.
Empty file.
6 changes: 3 additions & 3 deletions OpenRobertaServer/staticResources/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@
<script type="text/javascript" src="/roberta/roberta.js"></script> -->
<script type="text/javascript" src="/roberta/roberta.min.js"></script>

<!-- <script type="text/javascript" src="/simulation/simulationLogic/robot.js"></script>
<script type="text/javascript" src="/simulation/simulationLogic/robot.js"></script>
<script type="text/javascript" src="/simulation/simulationLogic/scene.js"></script>
<script type="text/javascript" src="/simulation/simulationLogic/simMath.js"></script>
<script type="text/javascript" src="/simulation/simulationLogic/simulation.js"></script> -->
<script type="text/javascript" src="/simulation/simulationLogic/simulationLogic.min.js"></script>
<script type="text/javascript" src="/simulation/simulationLogic/simulation.js"></script>
<!-- <script type="text/javascript" src="/simulation/simulationLogic/simulationLogic.min.js"></script> -->

<script type="text/javascript" src="/blockly/blockly_compressed.js"></script>
<script type="text/javascript" src="/blockly/blocks_compressed.js"></script>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ var SIM = (function() {
var imgSrc = [ "simulation/simBackgrounds/baustelle-02.svg", "simulation/simBackgrounds/simpleBackground.svg",
"simulation/simBackgrounds/drawBackground.svg", "simulation/simBackgrounds/robertaBackground.svg",
"simulation/simBackgrounds/rescueBackground.svg", "simulation/simBackgrounds/mathBackground.svg" ]; //TODO combine to one image for better performance
var imgSrcIE = [ "simulation/simBackgrounds/baustelle-02.svg", "simulation/simBackgrounds/simpleBackground.png",
"simulation/simBackgrounds/drawBackground.png", "simulation/simBackgrounds/robertaBackground.png",
"simulation/simBackgrounds/rescueBackground.png", "simulation/simBackgrounds/mathBackground.png" ];
var img;
var timerStep = 0;
var ready;
Expand Down Expand Up @@ -171,6 +174,9 @@ var SIM = (function() {
info = false;
robot.reset();
img = [];
if (isIE()) {
imgSrc = imgSrcIE;
}
loadImages(0);
}

Expand Down Expand Up @@ -480,6 +486,18 @@ var SIM = (function() {
function getAverageTimeStep() {
return averageTimeStep;
}

function isIE() {
var ua = window.navigator.userAgent;
var ie = ua.indexOf('MSIE ');
var ie11 = ua.indexOf('Trident/');

if ((ie > -1) || (ie11 > -1)) {
return true;
}
return false;
}

return {
"init" : init,
"setPause" : setPause,
Expand Down

0 comments on commit 89ee833

Please sign in to comment.