AnsweredAssumed Answered

Lunchpad Theme open widget Right

Question asked by alex_mtq on Oct 9, 2020

Using Lunchpad theme, Wab 2.17 for dev.

 

Hi

I'm trying to change the Panel.js  [install dir]server\apps\[ap number]\themes\LaunchpadTheme\panels\LaunchpadPanel.

 

I'd like to have Widget opens from right to left. Starting close to the right margin. Solution must be coherent with mobile device.

 

position.right = ?????

 

 

    setPosition: function(position){
      var style, box, row, col, size;

      box = this._getLayoutBox();
      size = Math.floor(box.w / (position.width + position.margin));

      row = Math.floor(position.index / size);
      col = position.index % size;
      //position.left = (row + 1) * position.margin + col * (position.width + position.margin) - MARGIN_LEFT ;

      position.right = ???
      position.top -= position.margin * row;
     
      this.position = lang.clone(position);

      if(window.appInfo.isRunInMobile){
        position.left = 0;
        position.top = box.h / 2;
        position.width = box.w;
        position.height = box.h / 2;
      }

      style = utils.getPositionStyle(position);
      style.position = 'absolute';

      domConstruct.place(this.domNode, jimuConfig.mapId);
      domStyle.set(this.domNode, style);

      this._onResponsible();
    },

Any ideas??

 

 

Alex

Outcomes