static/kelmu.editor.js
function() {
      var elem = $(this);
      var data = window.kelmu.data[id];
      data.selectedElementNumber = parseInt(elem.attr('data-annotation'), 10);
      var elemData = data.definitions['step' + data.stepNumber][data.subStepNumber][data.selectedElementNumber];
      elemData.top = parseFloat(elem.css('top'));
      elemData.left = parseFloat(elem.css('left'));

      if (elem.hasClass('kelmu-annotation')) {
        elemData.height = elem.height();
        elemData.width = elem.width();
      }
    }
function() {
      var elem = $(this);
      var data = window.kelmu.data[id];
      data.selectedElementNumber = parseInt(elem.attr('data-annotation'), 10);
      var elemData = data.definitions['step' + data.stepNumber][data.subStepNumber][data.selectedElementNumber];
      elemData.top = parseFloat(elem.css('top'));
      elemData.left = parseFloat(elem.css('left'));

      if (elem.hasClass('kelmu-annotation')) {
        elemData.height = elem.height();
        elemData.width = elem.width();
      }
    }
function ( ) { var elem = $ ( this ) ; var data = window . kelmu . data [ id ] ; data . selectedElementNumber = parseInt ( elem . attr ( 'data-annotation' ) , 10 ) ; var elemData = data . definitions [ 'step' + data . stepNumber ] [ data . subStepNumber ] [ data . selectedElementNumber ] ; elemData . top = parseFloat ( elem . css ( 'top' ) ) ; elemData . left = parseFloat ( elem . css ( 'left' ) ) ; if ( elem . hasClass ( 'kelmu-annotation' ) ) { elemData . height = elem . height ( ) ; elemData . width = elem . width ( ) ; } }
Updates the position definition for the selected element.
The function should be called so that `this` referes to the element.
Updates the position definition for the selected element . The function should be called so that this referes to the element .