Jump to content

BJOBrien

Members
  • Posts

    11
  • Joined

  • Last visited

BJOBrien's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. What does one normally do to test if a string is blank or has a zero length or is null? Do such things apply in javascript?
  2. I've got a string of characters that look like Echo procedure 12/20/2016 12:05:32 PM The first word of the line can change. The second word is always procedure then a date and then a time then AM or PM how can I see if a string I have 'matches' this format?
  3. For sure... do all elements get the event and process them? Or is there only one event handler?
  4. I have three canvasses on my web page as illustrated here: https://www.dropbox....um/ccs.png?dl=0I've been trying to control how they are positioned and scrolled.Grey Canvas:Is locked to the top of the web page and only scrolls horizontally.Brown Canvas:Is locked to the left side of the web page and only scrolls verticallyBlue Canvas:Is free to scroll horizontally and vertically.As the blue canvas scrolls vertically so does the Brown Canvas.As the blue canvas scrolls horizontally so does the Grey Canvas.The z-index is shown so as to illustrate how objects are stacked. <html> <head> <style type='text/css'> canvas.headerCanvas { position:fixed; top:0; left:0; height:50px; width:1000px; background-color:grey; /* just for testing, delete later */ border:3px red solid; /* just for testing, delete later */ z-index:2; } canvas.leftCanvas { position:fixed; top:0; left:0; height:950px; width:50px; background-color:yellow; /* just for testing, delete later */ border:3px red solid; /* just for testing, delete later */ z-index:1; } canvas.bodyCanvas { position:fixed; top:0; left:0; display:block; height:1000px; width:1000px; background-color:blue; /* just for testing, delete later */ border:3px red solid; /* just for testing, delete later */ z-index:0; } </style> </head> <body> <canvas id='CanvasH' class='headerCanvas'></canvas> <canvas id='CanvasL' class='leftCanvas'></canvas> <canvas id='CanvasB' class='bodyCanvas'></canvas> </body></html> What I'm trying to figure out is how to trap the scroll event for the main canvas, then I can position the others manually... I think. It has been suggested that a flexbox might be a more appropriate object than a canvas but I don't know much about them. Any help is appreciated. TIAB.
  5. Thanks I will look at that. Row 0 is 'like' an x axis while column 0 is the time axis. I draw the entire plot on the canvas and as I scroll it around... (I can't fit the entire plot on the screen and don't want to use a zoom as the detail when everything is viewable is too small.) So as I pan the canvas I want the axis to move.... Another example that fits this paradym is a map that you scoll and the x/y axises are lat/long. Thanks for your input... Always ready to hear any suggestions.
  6. ctx.setLineDash([5, 15]); Sets the line dash... but what do I do when I want solid lines again?
  7. Would you agree that it might be time to move this thread to the Javascript group? I think I need to move the layer 0 and 1 around with java script (as you recommended) and just let layer 0 do it's own thing. Think of this like a spread sheet.. where column 0 doesn't move (horizontally) and row 0 doesn't move vertically. I respect your opinion on limiting motion but this would seem like a pretty standard interface, wouldn't it?
  8. sorry... drop box let me down... <html> <head> <style type='text/css'> canvas.headerCanvas { position:fixed; top:0; left:0; height:50px; width:1000px; background-color:grey; /* just for testing, delete later */ border:3px red solid; /* just for testing, delete later */ z-index:2; } canvas.leftCanvas { position:fixed; top:0; left:0; height:950px; width:50px; background-color:yellow; /* just for testing, delete later */ border:3px red solid; /* just for testing, delete later */ z-index:1; } canvas.bodyCanvas { position:fixed; top:0; left:0; display:block; height:1000px; width:1000px; background-color:blue; /* just for testing, delete later */ border:3px red solid; /* just for testing, delete later */ z-index:0; } </style> </head> <body> <canvas id='CanvasH' class='headerCanvas'></canvas> <canvas id='CanvasL' class='leftCanvas'></canvas> <canvas id='CanvasB' class='bodyCanvas'></canvas> </body></html>
  9. This is the html of the three canvasses.https://www.dropbox.com/s/mashfba4cwvl2cq/experiment.html?dl=0
  10. I have three canvasses on my web page as illustrated here: https://www.dropbox.com/s/4wpsqfoboyi43um/ccs.png?dl=0I've been trying to control how they are positioned and scrolled.Grey Canvas:Is locked to the top of the web page and only scrolls horizontally.Brown Canvas:Is locked to the left side of the web page and only scrolls verticallyBlue Canvas:Is free to scroll horizontally and vertically.As the blue canvas scrolls vertically so does the Brown Canvas.As the blue canvas scrolls horizontally so does the Grey Canvas.The z-index is shown so as to illustrate how objects are stacked.I have attempted to use Google chrome (F9) to get this right but have failed miserably.Any help is appreciated.TIAB.
×
×
  • Create New...