spiralIcon

JSGrafix Sandbox

Help > How to Modify JSGS Shapes in Chrome

Yeah, it's possible to make 'simple' temporary changes to JavaScript source code without having an IDE like VSCode.

In the movie below we show this process as we modify a TNT Library element source code: TNTSquare. Grab some popcorn and let's watch!

The action steps are outlined again below, for your convenience.

Modifying a 'TNTSquare' with Chrome

Similar modifications could have been made using any library shape or design!


Modifying Shapes/Designs Online with Chrome:

On a desktop device, in Google Chrome (possibly other browsers if you are clever), it's possible to modify some aspects of the library shapes and/or designs within the browser! No IDE required!

Take these steps:
  1. Open a page for a library graphics element you wish to investigate, like TNTDisk
  2. Open the Developer Tools Panel:
    1. Shift-Control-J or Right-Mouse-Click Canvas >'Inspect'
    2. Click on the 'Sources' tab
  3. In the left 'fly-out' window/panel while viewing 'Sources', you will see the HTML page you selected highlighted, such as 'tntDisk.html'
  4. Above that selected file, there is a scripts folder that houses the JavaScript code that made the image
  5. Click on that folder and you will see a .js file that matches the name of the HTML file you're viewing
  6. Select (click on) that file and in the right panel you will see the source code for the image
  7. Find the function drawMyDesign Most of the modifications you might like to make are there, but there could be others in initialize or makePicture
  8. Valid modifications you make there, (once saved using 'Control-S') can be activated by hitting the 'Reload' button on the library page, next to the image. (The file tab shows a (*) for unsaved changes)
  9. Your changes are not permanent; once you refresh the page with Chrome's 'Refresh' button (the circular arrow icon), or navigate away from it, those temporary changes are lost

If you are a movie fan, hike on over to a screencast we made to illustrate the process of modifying a TNTSquare within Chrome using Chrome Developer Tools.