Skip to content

Commit 9f8cda5

Browse files
committed
Merge branch 'gh-pages' of https://github.com/LivelyKernel/lively4-core into gh-pages
2 parents 6d1452b + 8c1c31c commit 9f8cda5

File tree

8 files changed

+58
-71
lines changed

8 files changed

+58
-71
lines changed

src/client/lively.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1961,12 +1961,15 @@ export default class Lively {
19611961
if (!evt.shiftKey) { // evt.ctrlKey
19621962
evt.preventDefault();
19631963
evt.stopPropagation();
1964+
19641965
// #Hack #Workaround weired browser scrolling behavior
19651966
if (lively.lastScrollLeft || lively.lastScrollTop) {
19661967
document.scrollingElement.scrollTop = lively.lastScrollTop;
19671968
document.scrollingElement.scrollLeft = lively.lastScrollLeft;
19681969
}
19691970

1971+
if (self.__preventGlobalContextMenu__) { return; }
1972+
19701973
var link = Array.from(evt.composedPath()).find(ea => ea.localName == "a")
19711974
if (link) {
19721975
// #TODO can we shorten this or hide this context specific behavior,

src/client/reactive/components/rewritten/jumping-cubes.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import MCTS from './jumping-cubes-mcts.js';
88
import Matrix from './square-matrix.js';
99

1010
import { shake } from 'utils';
11+
import { fa4 } from 'src/client/utils/font-awesome-utils.js';
1112

1213
class Cube {
1314

@@ -588,10 +589,6 @@ export default class JumpingCubes extends Morph {
588589
evt.stopPropagation();
589590
evt.preventDefault();
590591

591-
function fa4(classes) {
592-
return '<i class="fa fa-' + classes + '" aria-hidden="true"></i>';
593-
}
594-
595592
const players = this.getConfig().players.map((player, index) => {
596593
function checkIcon(enabled) {
597594
return enabled ? fa4('check-square-o') : fa4('square-o');
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
export function fa4(classes) {
3+
return '<i class="fa fa-' + classes + '" aria-hidden="true"></i>';
4+
}

src/components/tools/lively-sync.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,6 @@ export default class Sync extends Morph {
3131
this.get('#gitrepository').addEventListener("change", evt => this.onGitrepositoryInputChange(evt))
3232
this.get('#serverUrl').addEventListener("change", evt => this.onServerUrlInputChange(evt))
3333

34-
35-
var travis = this.get("#travisLink");
36-
travis.onclick = () => {
37-
window.open(travis.getAttribute("href"));
38-
return false;
39-
};
4034
this.updateWindowTitle()
4135
this.updateServerURL()
4236
}

src/components/tools/lively-sync.js.l4a

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/components/widgets/academic-query.js

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import Morph from 'src/components/widgets/lively-morph.js';
22
import AcademicSubquery from "src/components/widgets/academic-subquery.js";
33

4+
var timeout;
5+
46
export default class AcademicQuery extends Morph {
57
constructor() {
68
super();
@@ -16,14 +18,17 @@ export default class AcademicQuery extends Morph {
1618
// irgendwo unter ihm Text ändert
1719
var observer = new MutationObserver((mutations) => {
1820
mutations.forEach(async mutation => {
19-
//lively.notify("SUPER observation", mutation.type)
20-
if (mutation.type == "childList") {
21-
if (this.subquery) {
22-
this.textContent = await this.subquery.viewToQuery();
23-
var input = this.get('#queryInput');
24-
input.value = this.getQuery();
21+
lively.notify("SUPER observation", mutation.type)
22+
clearTimeout(timeout);
23+
timeout = setTimeout(async () => {
24+
if (mutation.type == "childList") {
25+
if (this.subquery) {
26+
this.textContent = await this.subquery.viewToQuery();
27+
var input = this.get('#queryInput');
28+
input.value = this.getQuery();
29+
}
2530
}
26-
}
31+
}, 1000);
2732
})
2833
});
2934

src/components/widgets/academic-subquery.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
position: absolute;
2828
bottom: 125%;
2929
left: 50%;
30-
margin-bottom: -3px;
30+
margin-bottom: -4px;
3131

3232
/* Fade in hover */
3333
opacity: 0;
@@ -39,10 +39,10 @@
3939
}
4040

4141
.dropTarget {
42-
border: 3px solid white;
42+
border: 2px solid white;
4343
}
4444
.dropTarget.over {
45-
border: 3px dotted #666;
45+
border: 2px dotted #666;
4646
}
4747

4848
.queryPart:blank {

0 commit comments

Comments
 (0)