Opened 10 years ago

Last modified 5 years ago

#14379 assigned defect

[patch][cla] GridContainerLite - publish restriction only on keyboard event

Reported by: Mathevet julien Owned by: dylan
Priority: high Milestone: 1.15
Component: DojoX Layout Version: 1.7.0
Keywords: GridContainerLite mdnd Cc:
Blocked By: Blocking:


In testGridContainerLite.html a function is connected to "/dojox/layout/gridContainer/moveRestriction", which is only publish on keyboard event.

This patch add publish from mdnd and then !gridContainerLite resend it.

Attachments (2)

patchPublishDragRestriction.diff (1.6 KB) - added by Mathevet julien 10 years ago.
patchPlubishDragRestriction.diff (2.5 KB) - added by Mathevet julien 10 years ago.

Download all attachments as: .zip

Change History (12)

Changed 10 years ago by Mathevet julien

comment:1 Changed 10 years ago by Mathevet julien

This patch doesn't work... You have to extract function from statement. And use this._accepted in statement:

-        if(!this._isAccepted(this._dragItem.type, this._areaList[this._currentIndexArea].accept)){
+        this._isAccepted(this._dragItem.type, this._areaList[this._currentIndexArea].accept)
+        if(!this._accept){

Changed 10 years ago by Mathevet julien

comment:2 Changed 10 years ago by bill

That's a strange patch, why are you calling connect.publish() instead of topic.publish()? There's no such function as connect.publish(), is there?

comment:3 Changed 10 years ago by Mathevet julien

It was because I didn't use new topic API which don't use array. It was new. To avoid changing all subscribe/publish I used old one (dojo.publish or dojo.subscribe) which point to in baseless

In current code, I think it doesn't work because we use publish with an array, is it ? I don't know if now there is a function with accept array with topic, is it ?

comment:4 Changed 10 years ago by bill

It looks like you can simply change

topic.publish("/dojox/layout/gridContainer/moveRestriction", [this]);


topic.publish("/dojox/layout/gridContainer/moveRestriction", this);

(without the parentheses). Right?

comment:5 Changed 10 years ago by Mathevet julien

Yes you could, but need to update test (layout/tests/test_GridContainerLite*), and change patch for mdnd/AreaManager.js. I haven't tested now. It was 8 months ago

Main idea wasn't to change from topic to connect but to publish restriction on mouse move.

comment:6 Changed 10 years ago by bill

Actually they should be independent. You can publish using dojo/topic and subscribe with dojo/_base/connect, or vice-versa, and everything works.

comment:7 Changed 10 years ago by bill

In [29302]:

Fix baseless conversion error in [26978], topic.publish() takes varargs rather than an array, refs , #14235, #14379 !strict.

comment:5 Changed 9 years ago by Colin Snover

Milestone: 1.82.0

1.8 has been tagged; moving all outstanding tickets to next major release milestone.

comment:6 Changed 6 years ago by dylan

Milestone: 2.01.12
Owner: set to dylan
Status: newassigned

comment:7 Changed 5 years ago by dylan

Milestone: 1.131.15

Ticket planning... move current 1.13 tickets out to 1.15 to make it easier to move tickets into the 1.13 milestone.

Note: See TracTickets for help on using tickets.