Originally posted by TheBigYinJames
View Post
- Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
- Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!
Reply to: Cool Wall
Collapse
You are not logged in or you do not have permission to access this page. This could be due to one of several reasons:
- You are not logged in. If you are already registered, fill in the form below to log in, or follow the "Sign Up" link to register a new account.
- You may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
- If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.
Logging in...
Previously on "Cool Wall"
Collapse
-
I've added a picture find feature that saves you going to search for images, it does it for you.
-
Yeh it's a rounding error. When you move an image, it does a percentage calculation across the width and height of the screen. This is so it still spreads all the images out over whatever screen width and height you view the wall on. If I used absolute pixel positions, different screen sizes would mess it up. Since I store the percentages as integers, you're always going to get a few pixels worth of rounding.Originally posted by NickFitz View PostThere's something funky going on in your mouseup handler: if I go to a pic, mousedown, and mouseup without moving, the image frame is moved 5 pixels up and 10 pixels left. If I drag, a similar shift left and up from the drag end position is seen upon drop, presumably by the same amount.
Unfortunately it does always seem to be in the upwards/leftwards direction (due to truncation rather than rounding, I suppose) I'll look into it when I'm at ClientCo next week
Leave a comment:
-
There's something funky going on in your mouseup handler: if I go to a pic, mousedown, and mouseup without moving, the image frame is moved 5 pixels up and 10 pixels left. If I drag, a similar shift left and up from the drag end position is seen upon drop, presumably by the same amount.
On one occasion it seemed that it moved up 6 pixels, not 5, which might imply a rounding error somewhere. Not sure though...
Oh, this was in Safari 3 and Firefox 2 on OS X, BTW.
Leave a comment:
-
I should set up a "Clarkson's Tight Jeans' wall with categories ranging from "gonad squashing" to "tent flapping"Originally posted by Advocate View PostPost it in, Clarkson can use it in his "I was on the web and i found THIS.." link.
Leave a comment:
-
Post it in, Clarkson can use it in his "I was on the web and i found THIS.." link.
Leave a comment:
-
Like a lot of my side projects, I get bored of them after a while - when they don't make me any moneyOriginally posted by Money Money Money View PostThats quite good fun that!
You should send a link to clarkson!
With a bit of work I'm sure you could get it put on the Top Gear page of the bbc website.
May need parental control though!
But maybe the Beeb would want it for the Top Gear website.
Leave a comment:
-
Thats quite good fun that!
You should send a link to clarkson!
With a bit of work I'm sure you could get it put on the Top Gear page of the bbc website.
May need parental control though!
Leave a comment:
-
Yes, I see you added a huge ape pic. I was against storing the images for all the reasons you gave above, but mostly space and bandwidth from my webserver.Originally posted by NickFitz View PostIn the long run it might be best to have the server retrieve pics, thumbnail them to a suitable size, and serve them yourself rather than deep-linking - although this could end up using a fair bit of space. Then there's copyright issues...
My advice on the 'add new pic' dialogue is to use images from Google's image cache of results, since they are dinky enough to fit nicely on the page.
I will look at resizing the image on the fly, though.
Leave a comment:
-
You might want to look into limiting the size of pictures - a bit of CSS specifying max-width and max-height would probably be good enough for modern browsers (though not IE6) although it could mess up aspect ratios in certain circumstances - maybe inspecting the image dimensions and adding inline width and height attributes to the image element would be better (though don't tell the WaSP I said that).
In the long run it might be best to have the server retrieve pics, thumbnail them to a suitable size, and serve them yourself rather than deep-linking - although this could end up using a fair bit of space. Then there's copyright issues...
Leave a comment:
-
Ta, I'll look into it. I just cobbled together bits of AJAX script that I knew were working, it's very much a hash job.Originally posted by NickFitz View PostRemember, JavaScript functions are objects....[snip].
Leave a comment:
-
If I don't get bored with it, I was going to add a "make me a version of this" so you could drag and drop them where you want, and then be able to flick back and forward between theirs and yours.Originally posted by voodooflux View PostLooks good, although Seven of Nine and Number 6 are hotter than indicated
At the moment, you can only drag photos around on walls you create yourself (after registering + logging in)
Leave a comment:
-
Remember, JavaScript functions are objects. So if you change
toCode:function sendData(theData) { ajaxFunction('callbacks.pl',theData,'receiveData'); }
thenCode:function sendData(theData) { ajaxFunction('callbacks.pl',theData,receiveData); // removed quotes on last argument }
can be replaced withCode:xmlHttp.onreadystatechange=function() { if(xmlHttp.readyState==4) { eval(AJAXreceivingFunction + "('" + xmlHttp.responseText.replace(/'/gi,"\'") + "')"); } }
removing the need for an "eval", which is a Good Thing - "eval" actually has to kick off a whole new script engine instance, initialise it, and pass it the string to be parsed and executed, whereas a function reference can merely be executed using ( [which is actually defined in the language spec as the function invocation operator IIRC].Code:xmlHttp.onreadystatechange=function() { if(xmlHttp.readyState==4) { AJAXreceivingFunction(xmlHttp.responseText.replace(/'/gi,"\'")); // no eval } }
Check out Eric Lippert's post Eval is Evil, Part One for more details - he worked on the Microsoft scripting engines when they were first developed about ten years ago, and the execution model remains the same.
Leave a comment:
-
Looks good, although Seven of Nine and Number 6 are hotter than indicated
Leave a comment:
- Home
- News & Features
- First Timers
- IR35 / S660 / BN66
- Employee Benefit Trusts
- Agency Workers Regulations
- MSC Legislation
- Limited Companies
- Dividends
- Umbrella Company
- VAT / Flat Rate VAT
- Job News & Guides
- Money News & Guides
- Guide to Contracts
- Successful Contracting
- Contracting Overseas
- Contractor Calculators
- MVL
- Contractor Expenses
Advertisers

Leave a comment: