Files description - Subasy/FirefoxOS-plotting-calculator GitHub Wiki
On this page you will find description of the files which made up the application.
README.md
This file contains the description of the application.
manifest.webapp
The manifest of the app enabling to download the app.
plottin_calculator.html
This file is the ancestor file of the application, it contains the first prototype of the appplication.
Stare at this file to take aware of the first step the application started with.
The rest of the application is inspired by its content.
Currently this file is no longer used by the application, it has been splitted into several files described below.
index.html
This file is the homePage of the application, on this page we can found :
- A field named F(X) where the user should enter a mathematical function.
- A field named min X where the user should indicate minimal value for abscise X.
- A field named max X where the user should indicate maximal value for abscice X.
- A field named min Y where the user should indicate minimal value for ordonee Y.
- A field named max Y where the user should indicate maximum value for ordonee Y.
- The button "print the graph !" to launch the graph printing.
- A canvas where the graph would be printed, at the beggining the canvas only shows two axes.
- A link to teh file "calculator.js" (described below).
- A link to the file "workerRequest.js" (described below).
calculator.js
This file contains the main javascript scripts which makke the application work, it is made up of :
- Function showAxes(ctx,axes)- enables to calculate axes with two parameter (the context of the canvas and the axes calculation).
- Function drawAxes()- enables to draw axes for the graph.
- Function get_random_color()- enables to generate random color for each new graph.
- Function calculate()- enables to print the graph.
- Function back() - returns to the function definition page.
Contains the requests message name for the worker.
- START : Initiate the worker
- SET_DATA1 : Get the datas
- PERFORM : do the treatement with the datas
- CLOSE : close the worker
myWorker.js
This is a Worker for the evaluation and the calculations of points (x and y) for the graph. As the evaluation can be consuming it has been moved to a worker.
style.css
This is the stylesheet for the application.