Jump to content


Photo

TUniImage.Draggable.Enabled:=true; -> wrong position in UniScrollbox1


  • Please log in to reply
8 replies to this topic

#1 erich.wanker

erich.wanker

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 499 posts
  • LocationEurope / Austria / Salzburger Land / Bad Hofgastein

Posted 30 August 2017 - 03:16 PM

Hello,

 

  • if i make a TUniImage draggable - it works fine in a form 
  • if TUniImage.Parent:=UniScrollBox1; ->  then the draggable TUniImage has sometimes a wrong position  - if the scrollbox-area is scrolled...

 

i made a testcase .. see Posting below

 

ThanX
Erich

Attached Files


  • 0

Best Regards

Erich

 

Uses:

UniGui Version 1.0.0.1395

Delphi XE4 Professional

ReportBuilder 15 / Update 18

Zeos7  / Firebird 2.5

 

Testserver:

Win10 32bit german / Apache 2.4.3 mod_isapi 

 

MyBaby:

Maintenance Software

 

 

... i ♥ uniGUI


#2 erich.wanker

erich.wanker

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 499 posts
  • LocationEurope / Austria / Salzburger Land / Bad Hofgastein

Posted 31 August 2017 - 11:56 AM

i made a TestCase for better understanding ....

 

Info: Please save the "image.png" in uniservermodule.FilesFolderPath

 

 

 

 

if you scroll to the right side - the draggable image has a strange behavior 

 

Info:

I use "uniImage.OnEndDrag   :=   UniPanelMouseEnd;" 

- in this procedure - i recalc the position,   write new position in database and refresh differnt DB-Tables ... a important event for me....

 

 

 

 

Hope - someone can help :-)

 

ThanX

 

Erich

Attached Files


  • 0

Best Regards

Erich

 

Uses:

UniGui Version 1.0.0.1395

Delphi XE4 Professional

ReportBuilder 15 / Update 18

Zeos7  / Firebird 2.5

 

Testserver:

Win10 32bit german / Apache 2.4.3 mod_isapi 

 

MyBaby:

Maintenance Software

 

 

... i ♥ uniGUI


#3 erich.wanker

erich.wanker

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 499 posts
  • LocationEurope / Austria / Salzburger Land / Bad Hofgastein

Posted 04 September 2017 - 07:46 AM

push ;-)


  • 0

Best Regards

Erich

 

Uses:

UniGui Version 1.0.0.1395

Delphi XE4 Professional

ReportBuilder 15 / Update 18

Zeos7  / Firebird 2.5

 

Testserver:

Win10 32bit german / Apache 2.4.3 mod_isapi 

 

MyBaby:

Maintenance Software

 

 

... i ♥ uniGUI


#4 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 3432 posts

Posted 05 September 2017 - 08:51 AM

Hi Erich,

We need to analyze it
  • 0

#5 erich.wanker

erich.wanker

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 499 posts
  • LocationEurope / Austria / Salzburger Land / Bad Hofgastein

Posted 14 September 2017 - 09:38 AM

push :-)


  • 0

Best Regards

Erich

 

Uses:

UniGui Version 1.0.0.1395

Delphi XE4 Professional

ReportBuilder 15 / Update 18

Zeos7  / Firebird 2.5

 

Testserver:

Win10 32bit german / Apache 2.4.3 mod_isapi 

 

MyBaby:

Maintenance Software

 

 

... i ♥ uniGUI


#6 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 3432 posts

Posted 14 September 2017 - 11:27 AM

Hi Erich,

You need to pay attention to the constrainTo method
  • 0

#7 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 3432 posts

Posted 14 September 2017 - 06:16 PM

Or you can try to use this approach for now:

//meine_marker[meine_marker_anzahl].Draggable.Enabled:=true;

meine_marker[meine_marker_anzahl].JSInterface.JSAddListener(
                'afterrender',
                'function(me) {'+
                    'Ext.onReady(function() {'+
                        'me.dd=new Ext.dd.DDProxy(me, "");'+
                        'me.constrain=true;'+
                        'me.dd.startDrag=function() {'+                
                            'this.constrainX=true;'+
                            'this.maxX=MainForm.display_image.el.getRight()-me.width;'+
                            'this.minX=MainForm.form.getX();'+
                            'this.constrainY=true;'+
                            'this.maxY=MainForm.display_image.el.getBottom()-me.height;'+
                            'this.minY=MainForm.form.getY();'+
                        '}'+
                    '})'+
                '}'
);

  • 0

#8 erich.wanker

erich.wanker

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 499 posts
  • LocationEurope / Austria / Salzburger Land / Bad Hofgastein

Posted 15 September 2017 - 09:32 AM

Hello DelphiDeveloper  :-)  Perfect !! ThanX ! :-=

 

 

Just one question .. sorry ;-) 

 

How can i start a procedure "OnEndDrag"  ..  to recalc the new position and store the position in database?   ... delphi does not "see" the new position ...


  • 0

Best Regards

Erich

 

Uses:

UniGui Version 1.0.0.1395

Delphi XE4 Professional

ReportBuilder 15 / Update 18

Zeos7  / Firebird 2.5

 

Testserver:

Win10 32bit german / Apache 2.4.3 mod_isapi 

 

MyBaby:

Maintenance Software

 

 

... i ♥ uniGUI


#9 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 3432 posts

Posted 15 September 2017 - 11:32 AM

Just one question .. sorry ;-) 

 

How can i start a procedure "OnEndDrag"  ..  to recalc the new position and store the position in database?   ... delphi does not "see" the new position ...

'me.dd.afterDrag=function() {'+
    'ajaxRequest(...)'+
'};'+

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users