[elm-discuss] Re: Status of Elm drag-and-drop with html elements

2016-11-22 Thread Simon
Is DragNDrop still something that needs ot be implemented with Mouse. There 
seems to be so much support for dragging built into Html directly that we 
ought to be able to do things more directly in Em by now I would have 
thought?

On Wednesday, 7 September 2016 20:19:25 UTC+2, Ivan Uemlianin wrote:
>
> Dear James
>
> Thanks, that is very helpful.  Thanks both.
>
> Before today I had the impression it might not be possible at all.
>
> From both of your help, I'll try and put together (& publish) something 
> that is just bare Elm, with a html  where you can draggingly re-order 
> the s.  
>
> Best wishes
>
> Ivan
>
>
> On Wednesday, September 7, 2016 at 6:04:58 PM UTC+1, James Wilson wrote:
>>
>> Ivan alas you need the server to get as far as being able to see the DnD 
>> in practise! it's a stack/haskell thing so if you happen to be using stack 
>> it's quite straight forward (scripts/run-server.sh should do 
>> most/everything). for the client, an npm install and then npm run build 
>> should be enough to build and put it into the place run-server expects. 
>> I'll make proper instructions at some point but the App isn't quite there 
>> yet :)
>>
>> failing getting things going, looking at the code should give a fair 
>> idea. I'm basically putting elements wherever I need to to capture the 
>> relevant events (what did I click on to start a drag? what is my current 
>> drag above/below/between if anything?). a little css (dnd.scss) makes sure 
>> the drag helper elements are in the right place. the list of html my 
>> Dnd.view expects has each item paired with a unique ID String so that my 
>> drag thing can use these IDs to track where the drag currently is between 
>> and inform the outside world. It also exposes a few functions that the 
>> outside world can use to query the current Dnd model to find out about 
>> things. I use this in Main.elm to decide when and where to render an 
>> overlay and what should be in the overlay.
>>
>> It's a little rough still but seems to work really reliably so far; I was 
>> looking for a solution that didnt break if you went a bit nuts throwing the 
>> mouse around etc! It's also 100% Elm which I'm pleased with. There are def 
>> things that Elm makes difficult that I had to work around, for instance 
>> finding exactly where in the item I clicked would be nice, but it's also 
>> hard (impossible?) in Elm if the element has children, as the mousedown 
>> event target isn't always the element you care about etc.
>>
>> Anyway, hope it helps :)
>>
>>

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[elm-discuss] Re: Status of Elm drag-and-drop with html elements

2016-09-07 Thread Ivan Uemlianin
Dear James

Thanks, that is very helpful.  Thanks both.

Before today I had the impression it might not be possible at all.

>From both of your help, I'll try and put together (& publish) something 
that is just bare Elm, with a html  where you can draggingly re-order 
the s.  

Best wishes

Ivan


On Wednesday, September 7, 2016 at 6:04:58 PM UTC+1, James Wilson wrote:
>
> Ivan alas you need the server to get as far as being able to see the DnD 
> in practise! it's a stack/haskell thing so if you happen to be using stack 
> it's quite straight forward (scripts/run-server.sh should do 
> most/everything). for the client, an npm install and then npm run build 
> should be enough to build and put it into the place run-server expects. 
> I'll make proper instructions at some point but the App isn't quite there 
> yet :)
>
> failing getting things going, looking at the code should give a fair idea. 
> I'm basically putting elements wherever I need to to capture the relevant 
> events (what did I click on to start a drag? what is my current drag 
> above/below/between if anything?). a little css (dnd.scss) makes sure the 
> drag helper elements are in the right place. the list of html my Dnd.view 
> expects has each item paired with a unique ID String so that my drag thing 
> can use these IDs to track where the drag currently is between and inform 
> the outside world. It also exposes a few functions that the outside world 
> can use to query the current Dnd model to find out about things. I use this 
> in Main.elm to decide when and where to render an overlay and what should 
> be in the overlay.
>
> It's a little rough still but seems to work really reliably so far; I was 
> looking for a solution that didnt break if you went a bit nuts throwing the 
> mouse around etc! It's also 100% Elm which I'm pleased with. There are def 
> things that Elm makes difficult that I had to work around, for instance 
> finding exactly where in the item I clicked would be nice, but it's also 
> hard (impossible?) in Elm if the element has children, as the mousedown 
> event target isn't always the element you care about etc.
>
> Anyway, hope it helps :)
>
>

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[elm-discuss] Re: Status of Elm drag-and-drop with html elements

2016-09-07 Thread Ivan Uemlianin
Updating node fixed it, thanks.
Now I need to work out how to serve on 0.0.0.0 instead of localhost ...

Will report back once everything's up.

Ivan


On Wednesday, September 7, 2016 at 2:17:37 PM UTC+1, Sergey Skrynnikov 
wrote:
>
> Sorry for not linking this, you should be able to join the team here 
> http://elmlang.herokuapp.com/
> As a first guess - updating your node.js version could help (I just tried 
> installing everything from scratch and it worked on node 5.0.0 for me)
>
> среда, 7 сентября 2016 г., 16:12:17 UTC+3 пользователь Ivan Uemlianin 
> написал:
>>
>> I don't think I can, no, I'm not "currently associated with that team".
>>
>> Ivan
>>
>>
>> On Wednesday, September 7, 2016 at 2:04:20 PM UTC+1, Sergey Skrynnikov 
>> wrote:
>>>
>>> Interesting, I'll look into it. Could you contact me on the elm slack (
>>> https://elmlang.slack.com)? (i'm @sergey.skrynnikov)
>>>
>>> среда, 7 сентября 2016 г., 15:55:28 UTC+3 пользователь Ivan Uemlianin 
>>> написал:

 Dear Sergey

 I get errors if I run this with npm (I can run with the reactor but 
 there's no styling, and dnd doesn't happen).  Sample of top errors below.  
 What am I missing? (I have no experience with webpack or npm).


 [1] ERROR in ./src/Main.elm
 [1] Module build failed: TypeError: Object function Object() { [native 
 code] } has no method 'assign'
 [1] at Object.getOptions 
 (/home/rokiteer/elephant-guide/node_modules/elm-webpack-loader/index.js:
 20:17)
 [1] at Object.module.exports 
 (/home/rokiteer/elephant-guide/node_modules/elm-webpack-loader/index
 .js:40:28)
 [1]  @ ./src/index.js 6:10-29
 [1]
 [1] ERROR in 
 ./~/css-loader!./~/postcss-loader!./~/sass-loader!./src/styles/main.scss
 [1] Module build failed: ReferenceError: Promise is not defined
 ...

 Thanks

 Ivan


 On Wednesday, September 7, 2016 at 1:42:11 PM UTC+1, Sergey Skrynnikov 
 wrote:
>
> I've made a table with drag/drop reordering of rows with a bit of a 
> different approach, it gets the row positions through a port so that in 
> can 
> calculate the drop target based on the mouse position.
> https://github.com/IwalkAlone/elephant-guide/ - main logic in 
> src/components/deck/update.elm
> James's approach seems interesting too, I'll give it a look as well!
>
>
> среда, 7 сентября 2016 г., 15:03:20 UTC+3 пользователь Ivan Uemlianin 
> написал:
>>
>> Dear All
>>
>> I have a couple of GUIs I'd like to write in Elm.  One is done and 
>> working well.  The other is
>> currently written (by me) with React and included a drag-and-drop 
>> sortable list (i.e., list items
>> can be dragged to new positions in the list).
>>
>> What is the current status of drag-and-drop in Elm for html elements?
>>
>> I have read:
>>
>> - this thread, which seems to be about graphics elements only:
>>
>> https://groups.google.com/forum/#!topic/elm-discuss/wNKPqj8P2K8
>>
>> - this github repo, which I haven't been able to get working (have 
>> raised an issue):
>>
>> https://github.com/reactivetype/elm-dragNdrop
>>
>> Is there a library or module I can use as reference?  If not, what 
>> would be the chalenges of
>> implementing this?  (If I could have both these GUIs in Elm instead 
>> of Javascript that would mean a
>> lot to me:)
>>
>> With thanks and best wishes
>>
>> Ivan
>>
>

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[elm-discuss] Re: Status of Elm drag-and-drop with html elements

2016-09-07 Thread Ivan Uemlianin
I appear to be running v0.10.25 (on an ubuntu vm).

I'll update and try again, and join the slack team if that doesn't fix it.

Thanks

Ivan


On Wednesday, September 7, 2016 at 2:17:37 PM UTC+1, Sergey Skrynnikov 
wrote:
>
> Sorry for not linking this, you should be able to join the team here 
> http://elmlang.herokuapp.com/
> As a first guess - updating your node.js version could help (I just tried 
> installing everything from scratch and it worked on node 5.0.0 for me)
>
> среда, 7 сентября 2016 г., 16:12:17 UTC+3 пользователь Ivan Uemlianin 
> написал:
>>
>> I don't think I can, no, I'm not "currently associated with that team".
>>
>> Ivan
>>
>>
>> On Wednesday, September 7, 2016 at 2:04:20 PM UTC+1, Sergey Skrynnikov 
>> wrote:
>>>
>>> Interesting, I'll look into it. Could you contact me on the elm slack (
>>> https://elmlang.slack.com)? (i'm @sergey.skrynnikov)
>>>
>>> среда, 7 сентября 2016 г., 15:55:28 UTC+3 пользователь Ivan Uemlianin 
>>> написал:

 Dear Sergey

 I get errors if I run this with npm (I can run with the reactor but 
 there's no styling, and dnd doesn't happen).  Sample of top errors below.  
 What am I missing? (I have no experience with webpack or npm).


 [1] ERROR in ./src/Main.elm
 [1] Module build failed: TypeError: Object function Object() { [native 
 code] } has no method 'assign'
 [1] at Object.getOptions 
 (/home/rokiteer/elephant-guide/node_modules/elm-webpack-loader/index.js:
 20:17)
 [1] at Object.module.exports 
 (/home/rokiteer/elephant-guide/node_modules/elm-webpack-loader/index
 .js:40:28)
 [1]  @ ./src/index.js 6:10-29
 [1]
 [1] ERROR in 
 ./~/css-loader!./~/postcss-loader!./~/sass-loader!./src/styles/main.scss
 [1] Module build failed: ReferenceError: Promise is not defined
 ...

 Thanks

 Ivan


 On Wednesday, September 7, 2016 at 1:42:11 PM UTC+1, Sergey Skrynnikov 
 wrote:
>
> I've made a table with drag/drop reordering of rows with a bit of a 
> different approach, it gets the row positions through a port so that in 
> can 
> calculate the drop target based on the mouse position.
> https://github.com/IwalkAlone/elephant-guide/ - main logic in 
> src/components/deck/update.elm
> James's approach seems interesting too, I'll give it a look as well!
>
>
> среда, 7 сентября 2016 г., 15:03:20 UTC+3 пользователь Ivan Uemlianin 
> написал:
>>
>> Dear All
>>
>> I have a couple of GUIs I'd like to write in Elm.  One is done and 
>> working well.  The other is
>> currently written (by me) with React and included a drag-and-drop 
>> sortable list (i.e., list items
>> can be dragged to new positions in the list).
>>
>> What is the current status of drag-and-drop in Elm for html elements?
>>
>> I have read:
>>
>> - this thread, which seems to be about graphics elements only:
>>
>> https://groups.google.com/forum/#!topic/elm-discuss/wNKPqj8P2K8
>>
>> - this github repo, which I haven't been able to get working (have 
>> raised an issue):
>>
>> https://github.com/reactivetype/elm-dragNdrop
>>
>> Is there a library or module I can use as reference?  If not, what 
>> would be the chalenges of
>> implementing this?  (If I could have both these GUIs in Elm instead 
>> of Javascript that would mean a
>> lot to me:)
>>
>> With thanks and best wishes
>>
>> Ivan
>>
>

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[elm-discuss] Re: Status of Elm drag-and-drop with html elements

2016-09-07 Thread Sergey Skrynnikov
Sorry for not linking this, you should be able to join the team here 
http://elmlang.herokuapp.com/
As a first guess - updating your node.js version could help (I just tried 
installing everything from scratch and it worked on node 5.0.0 for me)

среда, 7 сентября 2016 г., 16:12:17 UTC+3 пользователь Ivan Uemlianin 
написал:
>
> I don't think I can, no, I'm not "currently associated with that team".
>
> Ivan
>
>
> On Wednesday, September 7, 2016 at 2:04:20 PM UTC+1, Sergey Skrynnikov 
> wrote:
>>
>> Interesting, I'll look into it. Could you contact me on the elm slack (
>> https://elmlang.slack.com)? (i'm @sergey.skrynnikov)
>>
>> среда, 7 сентября 2016 г., 15:55:28 UTC+3 пользователь Ivan Uemlianin 
>> написал:
>>>
>>> Dear Sergey
>>>
>>> I get errors if I run this with npm (I can run with the reactor but 
>>> there's no styling, and dnd doesn't happen).  Sample of top errors below.  
>>> What am I missing? (I have no experience with webpack or npm).
>>>
>>>
>>> [1] ERROR in ./src/Main.elm
>>> [1] Module build failed: TypeError: Object function Object() { [native 
>>> code] } has no method 'assign'
>>> [1] at Object.getOptions 
>>> (/home/rokiteer/elephant-guide/node_modules/elm-webpack-loader/index.js:
>>> 20:17)
>>> [1] at Object.module.exports 
>>> (/home/rokiteer/elephant-guide/node_modules/elm-webpack-loader/index
>>> .js:40:28)
>>> [1]  @ ./src/index.js 6:10-29
>>> [1]
>>> [1] ERROR in 
>>> ./~/css-loader!./~/postcss-loader!./~/sass-loader!./src/styles/main.scss
>>> [1] Module build failed: ReferenceError: Promise is not defined
>>> ...
>>>
>>> Thanks
>>>
>>> Ivan
>>>
>>>
>>> On Wednesday, September 7, 2016 at 1:42:11 PM UTC+1, Sergey Skrynnikov 
>>> wrote:

 I've made a table with drag/drop reordering of rows with a bit of a 
 different approach, it gets the row positions through a port so that in 
 can 
 calculate the drop target based on the mouse position.
 https://github.com/IwalkAlone/elephant-guide/ - main logic in 
 src/components/deck/update.elm
 James's approach seems interesting too, I'll give it a look as well!


 среда, 7 сентября 2016 г., 15:03:20 UTC+3 пользователь Ivan Uemlianin 
 написал:
>
> Dear All
>
> I have a couple of GUIs I'd like to write in Elm.  One is done and 
> working well.  The other is
> currently written (by me) with React and included a drag-and-drop 
> sortable list (i.e., list items
> can be dragged to new positions in the list).
>
> What is the current status of drag-and-drop in Elm for html elements?
>
> I have read:
>
> - this thread, which seems to be about graphics elements only:
>
> https://groups.google.com/forum/#!topic/elm-discuss/wNKPqj8P2K8
>
> - this github repo, which I haven't been able to get working (have 
> raised an issue):
>
> https://github.com/reactivetype/elm-dragNdrop
>
> Is there a library or module I can use as reference?  If not, what 
> would be the chalenges of
> implementing this?  (If I could have both these GUIs in Elm instead of 
> Javascript that would mean a
> lot to me:)
>
> With thanks and best wishes
>
> Ivan
>


-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[elm-discuss] Re: Status of Elm drag-and-drop with html elements

2016-09-07 Thread Ivan Uemlianin
I don't think I can, no, I'm not "currently associated with that team".

Ivan


On Wednesday, September 7, 2016 at 2:04:20 PM UTC+1, Sergey Skrynnikov 
wrote:
>
> Interesting, I'll look into it. Could you contact me on the elm slack (
> https://elmlang.slack.com)? (i'm @sergey.skrynnikov)
>
> среда, 7 сентября 2016 г., 15:55:28 UTC+3 пользователь Ivan Uemlianin 
> написал:
>>
>> Dear Sergey
>>
>> I get errors if I run this with npm (I can run with the reactor but 
>> there's no styling, and dnd doesn't happen).  Sample of top errors below.  
>> What am I missing? (I have no experience with webpack or npm).
>>
>>
>> [1] ERROR in ./src/Main.elm
>> [1] Module build failed: TypeError: Object function Object() { [native 
>> code] } has no method 'assign'
>> [1] at Object.getOptions 
>> (/home/rokiteer/elephant-guide/node_modules/elm-webpack-loader/index.js:
>> 20:17)
>> [1] at Object.module.exports 
>> (/home/rokiteer/elephant-guide/node_modules/elm-webpack-loader/index
>> .js:40:28)
>> [1]  @ ./src/index.js 6:10-29
>> [1]
>> [1] ERROR in 
>> ./~/css-loader!./~/postcss-loader!./~/sass-loader!./src/styles/main.scss
>> [1] Module build failed: ReferenceError: Promise is not defined
>> ...
>>
>> Thanks
>>
>> Ivan
>>
>>
>> On Wednesday, September 7, 2016 at 1:42:11 PM UTC+1, Sergey Skrynnikov 
>> wrote:
>>>
>>> I've made a table with drag/drop reordering of rows with a bit of a 
>>> different approach, it gets the row positions through a port so that in can 
>>> calculate the drop target based on the mouse position.
>>> https://github.com/IwalkAlone/elephant-guide/ - main logic in 
>>> src/components/deck/update.elm
>>> James's approach seems interesting too, I'll give it a look as well!
>>>
>>>
>>> среда, 7 сентября 2016 г., 15:03:20 UTC+3 пользователь Ivan Uemlianin 
>>> написал:

 Dear All

 I have a couple of GUIs I'd like to write in Elm.  One is done and 
 working well.  The other is
 currently written (by me) with React and included a drag-and-drop 
 sortable list (i.e., list items
 can be dragged to new positions in the list).

 What is the current status of drag-and-drop in Elm for html elements?

 I have read:

 - this thread, which seems to be about graphics elements only:

 https://groups.google.com/forum/#!topic/elm-discuss/wNKPqj8P2K8

 - this github repo, which I haven't been able to get working (have 
 raised an issue):

 https://github.com/reactivetype/elm-dragNdrop

 Is there a library or module I can use as reference?  If not, what 
 would be the chalenges of
 implementing this?  (If I could have both these GUIs in Elm instead of 
 Javascript that would mean a
 lot to me:)

 With thanks and best wishes

 Ivan

>>>

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[elm-discuss] Re: Status of Elm drag-and-drop with html elements

2016-09-07 Thread Ivan Uemlianin
Dear Sergey

I get errors if I run this with npm (I can run with the reactor but there's 
no styling, and dnd doesn't happen).  Sample of top errors below.  What am 
I missing? (I have no experience with webpack or npm).


[1] ERROR in ./src/Main.elm
[1] Module build failed: TypeError: Object function Object() { [native 
code] } has no method 'assign'
[1] at Object.getOptions 
(/home/rokiteer/elephant-guide/node_modules/elm-webpack-loader/index.js:
20:17)
[1] at Object.module.exports 
(/home/rokiteer/elephant-guide/node_modules/elm-webpack-loader/index
.js:40:28)
[1]  @ ./src/index.js 6:10-29
[1]
[1] ERROR in 
./~/css-loader!./~/postcss-loader!./~/sass-loader!./src/styles/main.scss
[1] Module build failed: ReferenceError: Promise is not defined
...

Thanks

Ivan


On Wednesday, September 7, 2016 at 1:42:11 PM UTC+1, Sergey Skrynnikov 
wrote:
>
> I've made a table with drag/drop reordering of rows with a bit of a 
> different approach, it gets the row positions through a port so that in can 
> calculate the drop target based on the mouse position.
> https://github.com/IwalkAlone/elephant-guide/ - main logic in 
> src/components/deck/update.elm
> James's approach seems interesting too, I'll give it a look as well!
>
>
> среда, 7 сентября 2016 г., 15:03:20 UTC+3 пользователь Ivan Uemlianin 
> написал:
>>
>> Dear All
>>
>> I have a couple of GUIs I'd like to write in Elm.  One is done and 
>> working well.  The other is
>> currently written (by me) with React and included a drag-and-drop 
>> sortable list (i.e., list items
>> can be dragged to new positions in the list).
>>
>> What is the current status of drag-and-drop in Elm for html elements?
>>
>> I have read:
>>
>> - this thread, which seems to be about graphics elements only:
>>
>> https://groups.google.com/forum/#!topic/elm-discuss/wNKPqj8P2K8
>>
>> - this github repo, which I haven't been able to get working (have raised 
>> an issue):
>>
>> https://github.com/reactivetype/elm-dragNdrop
>>
>> Is there a library or module I can use as reference?  If not, what would 
>> be the chalenges of
>> implementing this?  (If I could have both these GUIs in Elm instead of 
>> Javascript that would mean a
>> lot to me:)
>>
>> With thanks and best wishes
>>
>> Ivan
>>
>

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[elm-discuss] Re: Status of Elm drag-and-drop with html elements

2016-09-07 Thread Ivan Uemlianin
Dear Sergey

Thanks very much! I'll try it out.

Best wishes

Ivan


On Wednesday, September 7, 2016 at 1:42:11 PM UTC+1, Sergey Skrynnikov 
wrote:
>
> I've made a table with drag/drop reordering of rows with a bit of a 
> different approach, it gets the row positions through a port so that in can 
> calculate the drop target based on the mouse position.
> https://github.com/IwalkAlone/elephant-guide/ - main logic in 
> src/components/deck/update.elm
> James's approach seems interesting too, I'll give it a look as well!
>
>
> среда, 7 сентября 2016 г., 15:03:20 UTC+3 пользователь Ivan Uemlianin 
> написал:
>>
>> Dear All
>>
>> I have a couple of GUIs I'd like to write in Elm.  One is done and 
>> working well.  The other is
>> currently written (by me) with React and included a drag-and-drop 
>> sortable list (i.e., list items
>> can be dragged to new positions in the list).
>>
>> What is the current status of drag-and-drop in Elm for html elements?
>>
>> I have read:
>>
>> - this thread, which seems to be about graphics elements only:
>>
>> https://groups.google.com/forum/#!topic/elm-discuss/wNKPqj8P2K8
>>
>> - this github repo, which I haven't been able to get working (have raised 
>> an issue):
>>
>> https://github.com/reactivetype/elm-dragNdrop
>>
>> Is there a library or module I can use as reference?  If not, what would 
>> be the chalenges of
>> implementing this?  (If I could have both these GUIs in Elm instead of 
>> Javascript that would mean a
>> lot to me:)
>>
>> With thanks and best wishes
>>
>> Ivan
>>
>

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[elm-discuss] Re: Status of Elm drag-and-drop with html elements

2016-09-07 Thread Sergey Skrynnikov
I've made a table with drag/drop reordering of rows with a bit of a 
different approach, it gets the row positions through a port so that in can 
calculate the drop target based on the mouse position.
https://github.com/IwalkAlone/elephant-guide/ - main logic in 
src/components/deck/update.elm
James's approach seems interesting too, I'll give it a look as well!


среда, 7 сентября 2016 г., 15:03:20 UTC+3 пользователь Ivan Uemlianin 
написал:
>
> Dear All
>
> I have a couple of GUIs I'd like to write in Elm.  One is done and working 
> well.  The other is
> currently written (by me) with React and included a drag-and-drop sortable 
> list (i.e., list items
> can be dragged to new positions in the list).
>
> What is the current status of drag-and-drop in Elm for html elements?
>
> I have read:
>
> - this thread, which seems to be about graphics elements only:
>
> https://groups.google.com/forum/#!topic/elm-discuss/wNKPqj8P2K8
>
> - this github repo, which I haven't been able to get working (have raised 
> an issue):
>
> https://github.com/reactivetype/elm-dragNdrop
>
> Is there a library or module I can use as reference?  If not, what would 
> be the chalenges of
> implementing this?  (If I could have both these GUIs in Elm instead of 
> Javascript that would mean a
> lot to me:)
>
> With thanks and best wishes
>
> Ivan
>

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[elm-discuss] Re: Status of Elm drag-and-drop with html elements

2016-09-07 Thread Ivan Uemlianin
Cool! Thanks very much!

Would I be able to run the client on its own, without the server (I'll try 
anyway)?

Best wishes

Ivan


On Wednesday, September 7, 2016 at 1:09:06 PM UTC+1, James Wilson wrote:
>
> I have actually just added DnD to my own Elm app. See 
>
> https://github.com/jsdw/talklicker/tree/master/client/src/elm
>
> DnD.elm contains most logic. that's then hooked into Main.elm and used to 
> wrap a list of elements and provide info for a drag overlay etc. I don't 
> really have time to detail how to build and run but hopefully the code on 
> it's own provides some inspiration! I basically used css and elements to 
> circumvent needing to know more about exactly where and what was clicked, 
> as it's harder to get some of that stuff in Elm. By positioning spacer 
> elements between each item and elements that cover the top and bottom 50% 
> of each item when a drag is in progress, as well as using Mouse and 
> Keyboard to listen for global events when a drag is in progress, I was able 
> to make somehting that seems quite robust and functional :)
>
> On Wednesday, 7 September 2016 13:03:20 UTC+1, Ivan Uemlianin wrote:
>>
>> Dear All
>>
>> I have a couple of GUIs I'd like to write in Elm.  One is done and 
>> working well.  The other is
>> currently written (by me) with React and included a drag-and-drop 
>> sortable list (i.e., list items
>> can be dragged to new positions in the list).
>>
>> What is the current status of drag-and-drop in Elm for html elements?
>>
>> I have read:
>>
>> - this thread, which seems to be about graphics elements only:
>>
>> https://groups.google.com/forum/#!topic/elm-discuss/wNKPqj8P2K8
>>
>> - this github repo, which I haven't been able to get working (have raised 
>> an issue):
>>
>> https://github.com/reactivetype/elm-dragNdrop
>>
>> Is there a library or module I can use as reference?  If not, what would 
>> be the chalenges of
>> implementing this?  (If I could have both these GUIs in Elm instead of 
>> Javascript that would mean a
>> lot to me:)
>>
>> With thanks and best wishes
>>
>> Ivan
>>
>

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.