176985602337900

Find freelancers. Lose those costly delays.

With 1.7 million freelancers, we'll match you with the perfect talent.

or, Register with Elance »

Javascript Function to layout rectangles in rectangle
Sign in to Add to Watch List

IT & Programming > Web Programming

View Change History

The client has made the following changes to the job.

Description
Date

Job awarded.

Jun 28, 2013
Close

Job Description

  |  Change History >>

Updated

Close
  • Posted: Wed, Jun 26, 2013
  • Time Left: Closed
  • Location: Anywhere
  • Client prefers freelancers from:
    Anywhere

    You are still able to submit a proposal for this job.

    The client prefers freelancers from
    a different location.

    You're still able to submit a proposal for this job, regardless of your location.
  • Start: Immediately
  • Budget: Less than $500
  • Fixed Price Job
  • Elance Escrow Protection
  • W9 Not Required
Sign in to view client's details

Javascript experience

Job Description:
I need a JS function which will layout specified number of equally sized rectangles into container rectangle.

If specified number of rectangles can't be fitted into container, initial rectangle size should be adjusted (keeping aspect ratio) to fit required number of rectangles. Goal is to have a maximum possible rectangle size where they all fit in container.

It should return a list of objects, where objects should contain coordinates of the top-left point of rectangle and size of corresponding rectangle. Rectangles should be centered horizontally and vertically within container.

Code must be fast (use some well-known algorithm for solving that problem, instead of stupid iterative guesses), I'm planning to call it hundred times per second. It should return meaningful results for any container size.

Code should pass jshint validation without errors.

Example signatures:
function do_layout(container_size, num_elements, initial_size) {
/...

Sign in or Register to see more

Desired Skills
Javascript
Job ID: 43374821
 
Proposals
Avg $ | High $ | Low $ — Show Pricing
  • Submit Date (Latest)

 Pakistan  |  
INVITED
Edinasoft is a professional IT services provider backed by a team of strong .NET and PHP Developers, Graphic Designers and eCommerce specialists....
4
  |  
 0.0   |  Private   |  0 Jobs
Bid ID: 43446863  |  Submitted: Jun 28, 2013 07:18 ET 
Proposal SEALED

 India
I am an expert in solving wide variety of problems. I can research highly technical subject matter. I have excellent background in science,math and...
3
  |  
 0.0   |  Private   |  0 Jobs
Bid ID: 43422992  |  Submitted: Jun 27, 2013 16:56 ET 
Proposal SEALED

 Brazil  |  
INVITED
I am an experienced web developer and web designer within 10+ years of proven work.
1
  |  
 0.0   |  $0 Earnings   |  0 Jobs
Bid ID: 43387618  |  Submitted: Jun 27, 2013 02:04 ET 
Proposal SEALED

Zeeshan Qayyum      
Zeeshan Qayyum's identity has been verified.  Learn More
 Pakistan
INVITED
Have expertise web and mobile technologies primarily PHP, Android and iOS. Excellent at giving solutions to huge level problems and designing...
4
  |  
 0.0   |  $0 Earnings   |  0 Jobs
Bid ID: 43384507  |  Submitted: Jun 27, 2013 00:18 ET 
Proposal SEALED

 United States  |  
Winner
Our business is bringing your online dreams to reality. We specialize in web design, development, search engine optimization and marketing. Our...
4
  |  
 5.0   |  Private   |  0 Jobs
Bid ID: 43378711  |  Submitted: Jun 26, 2013 19:44 ET 
Delivery
Within 1 day
$147.95
Elance is now an Upwork company.
Upwork is the choise of 4M+ clients. Get started working on Upwork today.
Are you ready to post a job like this one?
Post a Similar Job »