Skip to content

Commit

Permalink
Sliders work
Browse files Browse the repository at this point in the history
git-svn-id: http://www.geogebra.org/svn/trunk/geogebra@15092 23ce0884-8a58-47d3-bc5c-ddf1cd5b9f9e
  • Loading branch information
ancsingabor committed Jan 19, 2012
1 parent e0119f2 commit f1d273f
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 20 deletions.
Expand Up @@ -5715,7 +5715,7 @@ protected void processMouseMoved(AbstractEvent event) {
Hits hits = new Hits();
boolean noHighlighting = false;
setAltDown(event.isAltDown());

// label hit
GeoElement geo = view.getLabelHit(mouseLoc);
if (geo != null) {
Expand All @@ -5738,7 +5738,7 @@ protected void processMouseMoved(AbstractEvent event) {
hits = view.getHits();
switchModeForRemovePolygons(hits);
}

if (hits.isEmpty()) {
view.setToolTipText(null);
view.setDefaultCursor();
Expand All @@ -5754,9 +5754,10 @@ protected void processMouseMoved(AbstractEvent event) {
view.setHitCursor();
}
}

// for testing: save the full hits for later use
Hits tempFullHits = hits.clone();

// Application.debug("tempFullHits="+tempFullHits);

// set tool tip text
Expand All @@ -5765,7 +5766,7 @@ protected void processMouseMoved(AbstractEvent event) {
// hits = view.getTopHits(hits);

hits = hits.getTopHits();

sliderValue = null;
if (hits.size() == 1) {
GeoElement hit = hits.get(0);
Expand All @@ -5792,7 +5793,7 @@ protected void processMouseMoved(AbstractEvent event) {
}
}
}

if (!hits.isEmpty()) {
boolean alwaysOn = false;
if (view instanceof AbstractEuclidianView) {
Expand All @@ -5813,13 +5814,13 @@ protected void processMouseMoved(AbstractEvent event) {
view.updatePreviewable();
repaintNeeded = true;
}

if ((pastePreviewSelected != null) && !pastePreviewSelected.isEmpty()) {
transformCoords();
updatePastePreviewPosition();
repaintNeeded = true;
}

// show Mouse coordinates, manage alt -> multiple of 15 degrees
else if (view.getShowMouseCoords() && view.getAllowShowMouseCoords()) {
transformCoords();
Expand Down Expand Up @@ -5848,6 +5849,7 @@ protected void wrapMouseMoved(AbstractEvent event) {
}

setMouseLocation(event);

processMouseMoved(event);
//event.release(e.getID()); //does it necessary?

Expand Down Expand Up @@ -6298,6 +6300,7 @@ else if (movedGeoElement.isGeoText()) {
try {
movedGeoText.setStartPoint(loc);
} catch (Exception ex) {
ex.printStackTrace();
}
startPoint.setLocation(xRW, yRW);
} else {
Expand Down
13 changes: 9 additions & 4 deletions common/src/geogebra/common/euclidian/Hits.java
@@ -1,8 +1,9 @@
package geogebra.common.euclidian;

import geogebra.common.kernel.geos.*;
import geogebra.common.kernel.geos.Test;
import geogebra.common.kernel.kernelND.*;
import geogebra.common.main.AbstractApplication;

import java.util.ArrayList;
import java.util.Iterator;

Expand Down Expand Up @@ -31,11 +32,15 @@ public void init(){
polyCount = 0;
imageCount = 0;
}
//Can't override
//Can't override and GWT don't support CLONE anyway.
@SuppressWarnings("all")
public Hits clone() {

Hits ret = (Hits) super.clone();
Hits ret = new Hits();
if (this.size() > 0) {
for (int i = 0; i < this.size(); i++) {
ret.add(this.get(i));
}
}
ret.listCount = this.listCount;
ret.polyCount = this.polyCount;
ret.imageCount = this.imageCount;
Expand Down
6 changes: 6 additions & 0 deletions common/src/geogebra/common/main/AbstractApplication.java
Expand Up @@ -2628,6 +2628,12 @@ final public boolean showResetIcon() {
public boolean isUndoActive() {
return kernel.isUndoActive();
}

public static native void console(String string) /*-{
if ($wnd && $wnd.console) {
$wnd.console.log(string);
}
}-*/;


}
4 changes: 3 additions & 1 deletion desktop/geogebra/main/Application.java
Expand Up @@ -4823,7 +4823,9 @@ public boolean isWindowsVistaOrLater() {
public static boolean WINDOWS_VISTA_OR_LATER = WINDOWS
&& !OS.startsWith("windows 2000") && !OS.startsWith("windows 95")
&& !OS.startsWith("windows 98") && !OS.startsWith("windows nt")
&& !OS.startsWith("windows xp");
&& !OS.startsWith("windows xp");




}
3 changes: 2 additions & 1 deletion web/src/geogebra/web/euclidian/EuclidianController.java
Expand Up @@ -105,7 +105,7 @@ public void onGestureStart(GestureStartEvent event) {

public void onTouchCancel(TouchCancelEvent event) {
//AbstractEvent e = geogebra.web.euclidian.event.TouchEvent.wrapEvent(event.getNativeEvent());
Application.console(event.getAssociatedType().getName());
app.console(event.getAssociatedType().getName());
}

public void onTouchMove(TouchMoveEvent event) {
Expand Down Expand Up @@ -174,6 +174,7 @@ public void onMouseMove(MouseMoveEvent event) {
if (!DRAGMODE_MUST_BE_SELECTED) {
wrapMouseMoved(e);
} else {
app.console("drag");
wrapMouseDragged(e);
}

Expand Down
7 changes: 0 additions & 7 deletions web/src/geogebra/web/main/Application.java
Expand Up @@ -149,7 +149,6 @@ public void setTooltipFlag() {

@Override
public boolean isApplet() {
AbstractApplication.debug("implementation needed"); // TODO Auto-generated
return false;
}

Expand Down Expand Up @@ -715,12 +714,6 @@ public void showLoadingAnimation(boolean go) {
}
}

public static native void console(String str) /*-{
if ($wnd && $wnd.console) {
$wnd.console.log("no"+str);
}
}-*/;



}

0 comments on commit f1d273f

Please sign in to comment.