Commit Graph

4504 Commits

Author SHA1 Message Date
Émilie Feral
fb3f6ab6f3 [apps/code][python] ConsoleController doesn't keep any pointer/boolean to know
if the sandbox/matplotlib view controller is displayed. Its state won't be
always right; instead, use the StackViewController depth.

This fixes the following bug: when popping the sandbox/matplotlib view
controller, the first responder token was not given to the console
controller!
2020-04-01 10:18:09 +02:00
Émilie Feral
89b54d424e [apps/code] ConsoleController: when becoming first responder, check if a
controller is displayed and switch the first responder accordingly
2020-04-01 10:18:09 +02:00
Émilie Feral
886fc98350 [escher] Palette: factorize data color iteration 2020-04-01 10:18:08 +02:00
Émilie Feral
bd3fa60594 [app/graph] Enables zoom on CalculationGraphControllers 2020-04-01 10:18:08 +02:00
Émilie Feral
d504564334 [apps/shared] Create ZoomAndPanCurveViewController,
ZoomParameterController inherits from ZoomAndPanCurveViewController
2020-04-01 10:18:08 +02:00
Émilie Feral
52b6508d6c [apps/shared] Create ZoomCurveViewController:
SimpleInteractiveCurveViewController inherits from
ZoomCurveViewController
2020-04-01 10:18:08 +02:00
Émilie Feral
7d48d4e7c4 [apps/code] Console controller: display only one ExecutionViewController
at a time
2020-04-01 10:18:08 +02:00
Émilie Feral
53ec023ea0 [apps/code] ConsoleController: factorize code to reload the table 2020-04-01 10:18:08 +02:00
Émilie Feral
659da1dff8 [apps][python] ExecutionEnvironment handles hide sand display of sandbox
and plot controller the same way
2020-04-01 10:18:08 +02:00
Émilie Feral
51da01aa11 [apps/code] Remove 'm_preventEdition' from ConsoleController, it was
always used with m_preventEdition = true.
2020-04-01 10:18:08 +02:00
Émilie Feral
9e822e85e5 [apps/shared] CurveView: implement drawArrow 2020-04-01 10:18:08 +02:00
Émilie Feral
bc8dc0c59c [apps] Use drawSegment when drawing lines instead of drawCurve or
drawCartesianCurve
2020-04-01 10:18:08 +02:00
Émilie Feral
aaf71328ba [apps/shared] CurveView: resolve name conflict -
drawHorizontalOrVerticalSegment & drawSegment -
2020-04-01 10:18:08 +02:00
Romain Goyet
d71ad9b288 [wip] Convenience to test matplotlib 2020-04-01 10:18:08 +02:00
Romain Goyet
3df8018943 [apps/code] Remove useless code 2020-04-01 10:18:08 +02:00
Romain Goyet
a3b1b51f75 [pyton/matplotlib] Support plot 2020-04-01 10:18:08 +02:00
Romain Goyet
2b73c4c9aa [apps/code] Quick hacks to allow pushing a view controller 2020-04-01 10:18:08 +02:00
Romain Goyet
131df18b00 [python] A module can now ask to present a view controller 2020-04-01 10:18:08 +02:00
Léa Saviot
bd0b9f8a4a [apps/curve_view] Fix typo
The labels would not float on the right of the display
2020-03-31 15:16:39 +02:00
Léa Saviot
764cf1087a [apps/solver] Fix EquationStore::resolveLinearSystem
Scenario: solve a system with the maximum number of variables -> our
routine to compute the number of variables did not use
k_maxNumberOfVariables, so we ended up adding the same children to the
matrix Ab, which created ghosts, which made the deep reduction crash.
2020-03-31 12:05:38 +02:00
Léa Saviot
e828491171 [apps/probability] Test on finite integral computations 2020-03-16 11:40:40 +01:00
Léa Saviot
29b4c75227 [apps/probability] Assert discrete distributions override evaluation 2020-03-16 11:40:40 +01:00
Léa Saviot
5c70fdc7a6 [apps/probability] Handle a == b case in finite integral computation
For non continuous distributions, P(a <= X <= a) is not necessarily
null.
2020-03-16 11:40:40 +01:00
Léa Saviot
8168a125e6 [apps/statistics] Remove unused variable in HistogramView
It is unused as HistogramView now inherits Shared::HorizontallyLabeledCurveView
2020-03-11 13:58:41 +01:00
Léa Saviot
702772a7c9 [apps/reg] Store::m_seriesChecksum is Snapshot::m_prevModelsVersions
Share these objects instead of duplicating them
2020-03-11 11:43:36 +01:00
Léa Saviot
53705fb333 [apps/graph_ctrlr] Reload range if no previous model is present
We memoize the checksum of the x first models, and we check that one of
these models is still present when the graph view appears. If so, we do
not reload the range, other wise we reload it.

Scenario:
f(t) = [t^2  t+1] in parametric
Display the graph
f(x) = 1 on ]-inf;0]
g(x) = 2 on [0;inf[
Display the graph -> the range did not change
2020-03-11 11:43:36 +01:00
Léa Saviot
aab8974934 [apps] Memoize five model checksums 2020-03-11 11:43:36 +01:00
Romain Goyet
2bf83c43a8 [apps/shared] Factorize CurveView::label
There was a lot of code duplication.
I removed the initialization of xLabel{} and yLabels{} because those are
scratch buffers that shouldn't be accessed before being written to
anyway.
2020-03-11 09:51:33 +01:00
Ruben Dashyan
1ca902c129 [apps/shared/round_cursor_view] Comment about markRectAsDirty 2020-03-10 11:11:57 +01:00
Ruben Dashyan
8337e36f46 [apps/shared/*_cursor_view] CursorView inherits from TransparentView
so that CursorView tells its superview to redrawn in the background,
except the RoundCursorView.
2020-03-10 11:11:57 +01:00
Ruben Dashyan
afb1d18d65 [apps/shared/sum_graph_controller] Factor constexpr 2020-03-10 10:33:30 +01:00
Ruben Dashyan
f0ef84b3bc [apps/shared/sum_graph_controller] In LegendView::setSumLayout, factor Layout building 2020-03-10 10:33:30 +01:00
Ruben Dashyan
55bb3f677a [apps/shared/sum_graph_controller] In LegendView::setSumLayout, simplify equal sign 2020-03-10 10:33:30 +01:00
Ruben Dashyan
0a92579571 [apps/shared/sum_graph_controller] Fix variable type 2020-03-10 10:33:30 +01:00
Ruben Dashyan
04794dd26f [apps/shared/sum_graph_controller] Uniformize number of significant digits 2020-03-10 10:33:30 +01:00
Ruben Dashyan
7ee8c31c70 [apps/shared/sum_graph_controller] In LegendView::setSumLayout, factor sum symbol layout 2020-03-10 10:33:30 +01:00
Ruben Dashyan
24fa8b28a9 [apps/shared/sum_graph_controller] In LegendView::setSumLayout, factor m_sum.setAlignment 2020-03-10 10:33:30 +01:00
Ruben Dashyan
6b527d3b00 [apps/shared/sum_graph_controller] Rename setSumSymbol to setSumLayout 2020-03-10 10:33:30 +01:00
Ruben Dashyan
e1624c79aa [apps/shared/sum_graph_controller] Class doesn't need to hold m_sumLayout 2020-03-10 10:33:30 +01:00
Ruben Dashyan
7a633b1e75 [apps/sequence/sequence] SequenceModel's name method need not be virtual 2020-03-10 10:33:30 +01:00
Ruben Dashyan
fccd72b757 [apps/sequence/sequence] Do not memoize nameLayout
Fixes the following bug:
In the graph tab of the Sequence app, compute the sum of the terms of
a sequence from 1 to 9 and then from 1 to 10. The Layout is memoized
after the first time and mispositioned the second time since it is
not recomputed.
2020-03-10 10:33:30 +01:00
Léa Saviot
4f76e4418f [apps/console_edit_cell] Fix input result copying 2020-03-02 17:24:54 +01:00
Neven Sajko
aae5e49c01 Remove useless uses of const for return types
An integer or float value can not be assigned to, so there is no point
in qualifying it as const.
2020-03-02 09:48:23 +01:00
Léa Saviot
f12c53b3f2 [apps/code] printText should not be asynchronous in emscripten
Otherwise, we need to put in the whitelist all methods that might call
printText, which are a lot.
2020-02-27 11:32:26 +01:00
Ruben Dashyan
bdb29b9bf9 [apps/regression/graph_controller] Remove setRoundCrossCursorView's parameter
Get it directly from model
2020-02-26 09:50:43 +01:00
Ruben Dashyan
b8b6e4b5b8 [apps/regression/graph_controller] Update model before setting cursor view 2020-02-26 09:50:43 +01:00
Ruben Dashyan
4f279f15da [apps/regression/graph_controller] Inline selectRegressionCurve in header 2020-02-26 09:50:43 +01:00
Ruben Dashyan
436b934f76 [apps/regression/graph_controller] selectRegressionCurve does not update the cursor view
selectRegressionCurve is only called from GoToParameterController and is
part of the GraphController's API for updating the model. It should not
update the view. viewWillAppear does.
2020-02-26 09:50:43 +01:00
Ruben Dashyan
7e6a601af0 [apps/regression/graph_controller] Inline selectRegressionCurve in moveCursorVertically
In the graph controller, selectRegressionCurve is only called at one
place (in moveCursorVertically). In general, setRoundCrossCursorView is
called and *m_selectedDotIndex is updated. There is no reason at all to
do things differently.

Though selectRegressionCurve is called from GoToParameterController.
2020-02-26 09:50:43 +01:00
Ruben Dashyan
d13c243876 [apps/regression/graph_controller] Simplify viewWillAppear 2020-02-26 09:50:43 +01:00