Skip to content

Commit

Permalink
* Add calc() flowchart as per @jwm's review.
Browse files Browse the repository at this point in the history
  That's all, folks!
  • Loading branch information
audreyt committed Oct 10, 2014
1 parent 05ac623 commit 46e4378
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion spreadsheet/chapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,11 @@ As the bridge between the HTML view and the background worker, it has four purpo
* When the user changes the spreadsheet, send its new content to the worker.
* When computed results arrive from the worker, update the view and save the current state.

In the first line, we request the JS model `$scope` object from AngularJS:
The flowchart below shows the controller-worker interaction in more detail:

![Controller-Worker Flowchart](./images/00-flowchart.png)

Now let's walk through the code. In the first line, we request the JS model `$scope` object from AngularJS:

```js
angular.module('500lines', []).controller('Spreadsheet', function ($scope, $timeout) {
Expand Down
6 changes: 5 additions & 1 deletion spreadsheet/chapter.zh-tw.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,11 @@ _(Also available in [English](https://github.com/audreyt/500lines/blob/master/sp
* 當使用者更動試算表式,將新的內容傳送給背景工作者。
* 當工作者計算出結果時,更新文件顯示層,並儲存目前的狀態。

在第一行程式裡,我們向 AngularJS 要求 `$scope` 物件,來定義 JS 模型:
控制層和工作層之間的互動詳情,可以參考這張流程圖:

![控制層和工作層之間的互動](./images/00-flowchart.png)

現在來看程式碼。在第一行程式裡,我們向 AngularJS 要求 `$scope` 物件,來定義 JS 模型:

```js
angular.module('500lines', []).controller('Spreadsheet', function ($scope, $timeout) {
Expand Down
Binary file added spreadsheet/images/00-flowchart.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 46e4378

Please sign in to comment.