How Random Babbling Becomes Corporate Policy (t3knomanser) wrote,
How Random Babbling Becomes Corporate Policy

JavaScript Wackiness

So, I'm working on a web based Entity/Relationship designer that parses W3C XSD files and allows them to be edited (and will eventually, with some server-side mojo create SQL scripts to create that schema). In order to do this, I need a draggable-window type object. There are some solutions for this, but they're really messy and nasty- I want something real simple, really clean, and that means coding it myself.

It is 90% functional, but there's one problem. When you hold a mouse button down on the titlebar, the Window is now draggable- when you move the mouse you move the window. When you release the mouse button the window no longer follows your mouse. But, if you move the mouse really fast, you outrun the mousemove event, and your window stops moving. This is annoying.

My solution (which has yet to be implemented) is to create a "WindowDragProvider" class that provides the drag functionality for the entire browser window, not just the little "div" that's serving as my window. This will require rewriting most of the code I have so far. I am displeased by reality, but this does force me into a cleaner MVC design, so that's something.

  • Strange Things People Say About Me (to my face)

    Recently, I've been at the center of a trend. That trend is complete strangers asking me "Are you ____?" A quick summary. For example: Are you…

  • Writer's Block: If I could find my way

    -10,000 years, at minimum. Tomorrow is always better than today, especially when you can't fact-check.

  • Bob Morlang

    When I was working at Tri-Mount, we had these camp trucks. They were army surplus, and while they could take a beating, they only sort of worked. And…

  • Post a new comment


    Comments allowed for friends only

    Anonymous comments are disabled in this journal

    default userpic

    Your IP address will be recorded