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.


Job awarded.

Jun 28, 2013

Job Description

  |  Change History >>


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

    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
Job ID: 43374821
Avg $ | High $ | Low $ — Show Pricing
  • Submit Date (Latest)

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

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...
 0.0   |  Private   |  0 Jobs
Bid ID: 43422992  |  Submitted: Jun 27, 2013 16:56 ET 
Proposal SEALED

 Brazil  |  
I am an experienced web developer and web designer within 10+ years of proven work.
 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
Have expertise web and mobile technologies primarily PHP, Android and iOS. Excellent at giving solutions to huge level problems and designing...
 0.0   |  $0 Earnings   |  0 Jobs
Bid ID: 43384507  |  Submitted: Jun 27, 2013 00:18 ET 
Proposal SEALED

 United States  |  
Our business is bringing your online dreams to reality. We specialize in web design, development, search engine optimization and marketing. Our...
 5.0   |  Private   |  0 Jobs
Bid ID: 43378711  |  Submitted: Jun 26, 2013 19:44 ET 
Within 1 day
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 »