Ron Posted August 25, 2015 Share Posted August 25, 2015 As requested, a simple project showing some canvas drawing with auto layout, in relation to calendar systems. The JS itself is straightforward in these cases, as you do the calculations, store the rects and then just repond to events. Of course drag and drop makes things quite a bit more complex. Notice that the javascript is loaded into a stringlist in unimainmodule. This way it gets loaded on app reload, so you can edit the JS in your favorite editor and just hit F5 on the browser to see the changes as the unigui app reloads. No new compilation necessary, unless you of course work with the server ajax responses. Notice also the onresize event in ExtClientEvents, to trigger the canvas update. Another thing with loading the JS this way, is that you can add stuff before you send it to the htmlframe, like variables etc., and at the end tuck on the </script> statement. Notice that all JS loads into the same namespace, so use different variable names to avoid creating funny little bugs. Kaj unigui canvas test.zip Quote Link to comment Share on other sites More sharing options...
epos4u Posted August 27, 2015 Share Posted August 27, 2015 fantastic work, could you have a look at this and see if it can work with Unigui please as i am hopeless with js https://market.sencha.com/extensions/ext-ux-mgd-device-scanner thank you, Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted September 2, 2015 Administrators Share Posted September 2, 2015 Attachments are gone! I'm trying to fix. Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted September 2, 2015 Administrators Share Posted September 2, 2015 Attachments are gone! I'm trying to fix. Fixed! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.