2 Replies Latest reply on Feb 27, 2015 9:12 AM by elearning_dude

    Fine in Chrome but not on IE11

    elearning_dude Level 1

      I'm running into an issue where the composition works fine in Chrome but does not work in IE (version 11).

       

      I have an EA composition that contains 3 layers:

       

      1. An image of a tape measure.

      2. A shape (triangle)

      3. A textfield

       

      When the user drags the triangle across the X axis (I'm using jquery for this) and stops the drag, I want to evaluate where they are 'pointing' the triangle at in relation to the marks on the tape measure. And, if the triangle is between ### and ### of X then I write that measurement to the textfield. This works fine in Chrome but not in IE.

       

      On the Stage I have the following code:

       

      sym.setVariable("FEEDBACK", "NOT SET YET");

       

      $(function () {

         sym.$("triangle_slider").draggable({

        axis: 'x',

        stop: function () {

        // get the x position of the triangle_slider

        var position = sym.$("triangle_slider").position();

        var x = sym.$("triangle_slider").offset().left;

        measure = Math.trunc(x);

        switch (measure) {

                                  case 15:

                                      sym.$('FEEDBACK_TXT').html('1"');

                                      break;

                                  case 16:

                                      sym.$('FEEDBACK_TXT').html('1"');

                                      break;

                                  case 17:

                                      sym.$('FEEDBACK_TXT').html('1"');

                                      break;

                                  case 18:

                                      sym.$('FEEDBACK_TXT').html('1"');

                                      break;

                                  case 37:

                                      sym.$('FEEDBACK_TXT').html('1/16"');

                                      break;

                                  case 38:

                                      sym.$('FEEDBACK_TXT').html('1/16"');

                                      break;

                                  case 59:

                                      sym.$('FEEDBACK_TXT').html('1/8"');

                                      break;

                                  case 60:

                                      sym.$('FEEDBACK_TXT').html('1/8"');

                                      break;

                                  case 82:

                                      sym.$('FEEDBACK_TXT').html('3/16"');

                                      break;

                                  case 83:

                                      sym.$('FEEDBACK_TXT').html('3/16"');

                                      break;

                                  case 103:

                                      sym.$('FEEDBACK_TXT').html('1/4"');

                                      break;

                                  case 104:

                                      sym.$('FEEDBACK_TXT').html('1/4"');

                                      break;

                                  case 105:

                                      sym.$('FEEDBACK_TXT').html('1/4"');

                                      break;

                                  case 125:

                                      sym.$('FEEDBACK_TXT').html('5/16"');

                                      break;

                                  case 126:

                                      sym.$('FEEDBACK_TXT').html('5/16"');

                                      break;

                                  case 148:

                                      sym.$('FEEDBACK_TXT').html('3/8"');

                                      break;

                                  case 149:

                                      sym.$('FEEDBACK_TXT').html('3/8"');

                                      break;

                                  case 150:

                                      sym.$('FEEDBACK_TXT').html('3/8"');

                                      break;

                                  case 171:

                                      sym.$('FEEDBACK_TXT').html('7/16"');

                                      break;

                                  case 172:

                                      sym.$('FEEDBACK_TXT').html('7/16"');

                                      break;

                                  case 193:

                                      sym.$('FEEDBACK_TXT').html('1/2"');

                                      break;

                                  case 194:

                                      sym.$('FEEDBACK_TXT').html('1/2"');

                                      break;

                                  case 195:

                                      sym.$('FEEDBACK_TXT').html('1/2"');

                                      break;

                                  case 214:

                                      sym.$('FEEDBACK_TXT').html('9/16"');

                                      break;

                                  case 215:

                                      sym.$('FEEDBACK_TXT').html('9/16"');

                                      break;

                                  case 236:

                                      sym.$('FEEDBACK_TXT').html('5/8"');

                                      break;

                                  case 237:

                                      sym.$('FEEDBACK_TXT').html('5/8"');

                                      break;

                                  case 238:

                                      sym.$('FEEDBACK_TXT').html('5/8"');

                                      break;

                                  case 257:

                                      sym.$('FEEDBACK_TXT').html('11/16"');

                                      break;

                                  case 258:

                                      sym.$('FEEDBACK_TXT').html('11/16"');

                                      break;

                                  case 277:

                                      sym.$('FEEDBACK_TXT').html('3/4"');

                                      break;

                                  case 278:

                                      sym.$('FEEDBACK_TXT').html('3/4"');

                                      break;

                                  case 279:

                                      sym.$('FEEDBACK_TXT').html('3/4"');

                                      break;

                                  case 300:

                                      sym.$('FEEDBACK_TXT').html('13/16"');

                                      break;

                                  case 301:

                                      sym.$('FEEDBACK_TXT').html('13/16"');

                                      break;

                                  case 322:

                                      sym.$('FEEDBACK_TXT').html('7/8"');

                                      break;

                                  case 323:

                                      sym.$('FEEDBACK_TXT').html('7/8"');

                                      break;

                                  case 324:

                                      sym.$('FEEDBACK_TXT').html('7/8"');

                                      break;

                                  case 345:

                                      sym.$('FEEDBACK_TXT').html('15/16"');

                                      break;

                                  case 346:

                                      sym.$('FEEDBACK_TXT').html('15/16"');

                                      break;

                                  case 366:

                                      sym.$('FEEDBACK_TXT').html('2"');

                                      break;

                                  case 367:

                                      sym.$('FEEDBACK_TXT').html('2"');

                                      break;

                                  case 368:

                                      sym.$('FEEDBACK_TXT').html('2"');

                                      break;

                                  case 369:

                                      sym.$('FEEDBACK_TXT').html('2"');

                                      break;

                                  case 370:

                                      sym.$('FEEDBACK_TXT').html('2"');

                                      break;

                                  case 392:

                                      sym.$('FEEDBACK_TXT').html('1/16"');

                                      break;

                                  case 393:

                                      sym.$('FEEDBACK_TXT').html('1/16"');

                                      break;

                                  case 412:

                                      sym.$('FEEDBACK_TXT').html('1/8"');

                                      break;

                                  case 413:

                                      sym.$('FEEDBACK_TXT').html('1/8"');

                                      break;

                                  case 414:

                                      sym.$('FEEDBACK_TXT').html('1/8"');

                                      break;

                                  case 433:

                                      sym.$('FEEDBACK_TXT').html('3/16"');

                                      break;

                                  case 412:

                                      sym.$('FEEDBACK_TXT').html('3/16"');

                                      break;

                     }

       

        }

         });

      });

       

      Any assistance with this is greatly appreciated! I thought it might be a decimal issue so I added in the truncation method but that doesn't do any good.

        • 1. Re: Fine in Chrome but not on IE11
          elearning_dude Level 1

          To clarify - by "it doesn't work in IE11" what I mean specifically is:

           

          The value never gets written to the textfield and the triangle is no longer draggable once 'dropped' the first time.

          • 2. Re: Fine in Chrome but not on IE11
            elearning_dude Level 1

            Still not sure what did it but I wound up going back to another, similar composition that I had put together months ago and just modified that. Here is the working code, for others who may run into a similar issue:

             

            sym.setVariable("CURRENT_SELECTION", "0");

            sym.setVariable("FEEDBACK", "NOT SET YET");

             

             

            $(function () {

               sym.$("triangle_slider").draggable({

              axis: 'x',

              stop: function () {

             

              // get the x position of the triangle_slider

              var position = sym.$("triangle_slider").position();

              var x = sym.$("triangle_slider").offset().left;

              // 1"

              if (x >= 8 && x <= 12) {

              FEEDBACK = '1"';

              sym.$('FEEDBACK_TXT').html(FEEDBACK);

              } else if (x >= 30 && x <= 34) {

              FEEDBACK = '1/16"';

              sym.$('FEEDBACK_TXT').html(FEEDBACK);

              } else if (x >= 52 && x <= 56) {

              FEEDBACK = '1/8"';

              sym.$('FEEDBACK_TXT').html(FEEDBACK);

              } else if (x >= 75 && x <= 78) {

              FEEDBACK = '3/16"';

              sym.$('FEEDBACK_TXT').html(FEEDBACK);

              } else if (x >= 96 && x <= 100) {

              FEEDBACK = '1/4"';

              sym.$('FEEDBACK_TXT').html(FEEDBACK);

              } else if (x >= 118 && x <= 121) {

              FEEDBACK = '5/16"';

              sym.$('FEEDBACK_TXT').html(FEEDBACK);

              } else if (x >= 141 && x <= 145) {

              FEEDBACK = '3/8"';

              sym.$('FEEDBACK_TXT').html(FEEDBACK);

              } else if (x >= 164 && x <= 167) {

              FEEDBACK = '7/16"';

              sym.$('FEEDBACK_TXT').html(FEEDBACK);

              } else if (x >= 186 && x <= 190) {

              FEEDBACK = '1/2"';

              sym.$('FEEDBACK_TXT').html(FEEDBACK);

              } else if (x >= 207 && x <= 210) {

              FEEDBACK = '9/16"';

              sym.$('FEEDBACK_TXT').html(FEEDBACK);

              } else if (x >= 229 && x <= 233) {

              FEEDBACK = '5/8"';

              sym.$('FEEDBACK_TXT').html(FEEDBACK);

              } else if (x >= 250 && x <= 253) {

              FEEDBACK = '11/16"';

              sym.$('FEEDBACK_TXT').html(FEEDBACK);

              } else if (x >= 270 && x <= 274) {

              FEEDBACK = '3/4"';

              sym.$('FEEDBACK_TXT').html(FEEDBACK);

              } else if (x >= 293 && x <= 296) {

              FEEDBACK = '13/16"';

              sym.$('FEEDBACK_TXT').html(FEEDBACK);

              } else if (x >= 315 && x <= 319) {

              FEEDBACK = '7/8"';

              sym.$('FEEDBACK_TXT').html(FEEDBACK);

              } else if (x >= 339 && x <= 342) {

              FEEDBACK = '15/16"';

              sym.$('FEEDBACK_TXT').html(FEEDBACK);

              } else if (x >= 360 && x <= 364) {

              FEEDBACK = '2"';

              sym.$('FEEDBACK_TXT').html(FEEDBACK);

              } else if (x >= 360 && x <= 364) {

              FEEDBACK = '2"';

              sym.$('FEEDBACK_TXT').html(FEEDBACK);

              } else if (x >= 385 && x <= 388) {

              FEEDBACK = '1/16"';

              sym.$('FEEDBACK_TXT').html(FEEDBACK);

              } else if (x >= 405 && x <= 409) {

              FEEDBACK = '1/8"';

              sym.$('FEEDBACK_TXT').html(FEEDBACK);

              } else if (x >= 426 && x <= 429) {

              FEEDBACK = '3/16"';

              sym.$('FEEDBACK_TXT').html(FEEDBACK);

              } else {

              FEEDBACK = '';

              sym.$('FEEDBACK_TXT').html(FEEDBACK);

              }

             

             

              }

               });

            });