Project

General

Profile

Actions

Bug #6378

closed

"WTransform: Couldn't convert JSON to WTransform" when executing WPaintedWidget's paint on a mobile browser

Added by Ján Dugáček over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
Start date:
05/21/2018
Due date:
% Done:

0%

Estimated time:

Description

When I add this JSlot to a widget inheriting from WPaintedWidget (in constructor):

dragSlot_.setJavaScript(

"function(o, e) {"

"if (" + objJsRef() + ") {"+

transform_.jsRef() + "[4]e.movementX;\"

transform_.jsRef() + "[5]e.movementY;\"

repaintSlot().execJs() + ";"

"}"

"}");

touchMoved().connect(dragSlot_);

and I connect it to the mouseDragged event, it correctly allows me to drag the graphics around. However, when I do it on an Android mobile using a touchMoved event (I have tried two browsers, including Chrome), it is first dragged, but the server reports the "WTransform: Couldn't convert JSON to WTransform" error and dragging no longer works on the client (and that error is shown every time). I think that repaintSlot().execJs() corrupts the WTransform on the client side.

Actions #1

Updated by Roel Standaert over 6 years ago

  • Status changed from New to Feedback

It doesn't seem right to me that you're using e.movementX and e.movementY. Those members are present in MouseEvent, but not TouchEvent. Is that definitely the code you are using? If it's really a bug, could you provide a full test case (with main function) that reproduces it?

Actions #2

Updated by Ján Dugáček over 6 years ago

Yes, that was the problem. I have rewritten it and the problem is gone.

Actions #3

Updated by Roel Standaert over 6 years ago

  • Status changed from Feedback to Closed
Actions

Also available in: Atom PDF