Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #30503

Layered object

Newsgroups comp.lang.javascript
Date 2016-05-21 10:41 -0700
Message-ID <89e1dd41-b971-4f04-aad2-e726abe20d56@googlegroups.com> (permalink)
Subject Layered object
From jonas.thornvall@gmail.com

Show all headers | View raw


I have an object storing integers, many formulas may of course generate the same integer. And for some expressions for example on form a*x^j i would like to store each occurence. Now all my numbers are printed out in a square grid.

Right now the storing structure look like this and i set fontcolor and rectangle color as i print out the grid.

However i would like to store multiple func and rcolors within same object?
Thus make func and rcolor the multidimensional part of the array.

I am totally clueless for how both initiate and update such an object in javascript. I have managed to do it for numbers but i never initiated the object it was somehow forked in as i updated the object. And i really did not understand how it really worked. So if someone could show me howto make this array of integers to holld multiple functions and rectangles for each arr[i] it would be great.

function arraysize()
{

   for ( i = - scope; i <= scope; i ++ )
   {
      arr[i] =
      {
         count : i,
         func : '',
         fcolor : 'black',
         rheight : 100,
         rwidth : 100,
         rcolor : 'white',
         prime : true,
         formula : 0,
         sigma : 0,
      }
   }
}

Back to comp.lang.javascript | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Layered object jonas.thornvall@gmail.com - 2016-05-21 10:41 -0700
  Re: Layered object Aleksandro <aleksandro@gmx.com> - 2016-05-21 19:41 -0400
    Re: Layered object jonas.thornvall@gmail.com - 2016-05-21 23:42 -0700
      Re: Layered object jonas.thornvall@gmail.com - 2016-05-22 03:50 -0700
  Re: Layered object "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-05-22 09:03 -0700
    Re: Layered object jonas.thornvall@gmail.com - 2016-05-22 14:59 -0700
      Re: Layered object "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-05-22 15:57 -0700
        Re: Layered object jonas.thornvall@gmail.com - 2016-05-22 22:46 -0700
          Re: Layered object "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-05-25 17:13 -0700
        Re: Layered object jonas.thornvall@gmail.com - 2016-05-22 23:05 -0700
          Re: Layered object "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-05-25 17:15 -0700
        Re: Layered object jonas.thornvall@gmail.com - 2016-05-22 23:08 -0700
        Re: Layered object jonas.thornvall@gmail.com - 2016-05-23 08:31 -0700
          Re: Layered object jonas.thornvall@gmail.com - 2016-05-24 05:38 -0700
            Re: Layered object "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-05-25 17:22 -0700
              Re: Layered object jonas.thornvall@gmail.com - 2016-05-25 22:56 -0700
                Re: Layered object jonas.thornvall@gmail.com - 2016-05-25 23:07 -0700
                Re: Layered object jonas.thornvall@gmail.com - 2016-05-25 23:10 -0700
                Re: Layered object jonas.thornvall@gmail.com - 2016-05-25 23:24 -0700
                Re: Layered object jonas.thornvall@gmail.com - 2016-05-26 01:47 -0700
                Re: Layered object jonas.thornvall@gmail.com - 2016-05-26 01:53 -0700
                Re: Layered object jonas.thornvall@gmail.com - 2016-05-26 02:58 -0700
                Re: Layered object "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-05-26 06:42 -0700
                Re: Layered object Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-05-26 11:30 +0100
                Re: Layered object jonas.thornvall@gmail.com - 2016-05-26 03:47 -0700
                Re: Layered object Tim Streater <timstreater@greenbee.net> - 2016-05-26 12:43 +0100
                Re: Layered object Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-05-26 14:13 +0100
                Re: Layered object "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-05-26 07:05 -0700
                Re: Layered object jonas.thornvall@gmail.com - 2016-05-26 03:51 -0700
                Re: Layered object jonas.thornvall@gmail.com - 2016-05-26 04:00 -0700
                Re: Layered object Dr J R Stockton <reply1600@merlyn.demon.co.uk.invalid> - 2016-05-27 22:14 +0100
                Re: Layered object "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-05-26 06:40 -0700
          Re: Layered object "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-05-25 17:21 -0700

csiph-web