Education/Projects/ProcessingForTheWeb/cursor: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
Line 44: Line 44:
   <li>Test 3 -This tests the cursor(''src'',''width'',''height'') </li>
   <li>Test 3 -This tests the cursor(''src'',''width'',''height'') </li>
</ul>
</ul>
Please help me test this function. Run the tests above and fill out the table.<br />
'''Please help me test this function. Run the tests above and fill out the table.'''<br /><br />
Note: Not all of the cursor ''MODES'' work in all browsers. Check out [http://www.quirksmode.org/css/cursor.html css reference]. For testing purposes, test 2 will pass if at least one ''MODE'' is observed. <br />
Note: Not all of the cursor ''MODES'' work in all browsers. Check out [http://www.quirksmode.org/css/cursor.html css reference]. For testing purposes, test 2 will pass if at least one ''MODE'' is observed. <br />
{| class="wikitable" border="1" caption="Test Results"
{| class="wikitable" border="1" caption="Test Results"

Revision as of 21:01, 23 October 2009

Summary

This is a function written for Education/Projects/ProcessingForTheWeb. It sets the cursor to a predefined symbol, an image, or turns it on if already hidden. The function does not return anything. View official Reference

Examples

Functions

cursor() - this function sets the cursor to a predefined browser default. It will also turn on the cursor if it is already hidden.

cursor(MODE) - this function sets the cursor to a predefined MODE defined by the function's parameter.

  • MODE: either ARROW, CROSS, HAND, MOVE, TEXT, WAIT

cursor(src,width,height) - this function sets the cursor to an image . It is recommended to make the size of the image 16x16 or 32x32 pixels. The values for parameters width and height must be less than the dimensions of the image. otherwise, it will not load.

  • src: the path to the image
  • width: the width hotspot of the cursor
  • height: the height hotspot of the cursor

Bugs


Function Bug Description Fixed?(Date)
cursor(src,width,height) src - should be a PImage: any variable of type PImage, not image path No

Tests

  • Test 1 -This tests the cursor() function.
  • Test 2 -This tests the cursor(MODE) function.
  • Test 3 -This tests the cursor(src,width,height)

Please help me test this function. Run the tests above and fill out the table.

Note: Not all of the cursor MODES work in all browsers. Check out css reference. For testing purposes, test 2 will pass if at least one MODE is observed.

OS(version) Browser(version) test 1 test 2 test 3
Vista(Home SP1) Firefox(3.5.3) Passed Passed Passed
Vista(Home SP1) Chrome(3.0.195.27) Passed Passed Passed