Start working on moving all the images to icons and rename them to follow the convention family-image.png. Based on that, the current hardcode maps could be removed.
@ -36,7 +36,7 @@ mindplot.ImageIcon = function(iconModel, topic, designer) {
|
|||||||
|
|
||||||
var container = new Element('div');
|
var container = new Element('div');
|
||||||
var removeImage = new Element('img');
|
var removeImage = new Element('img');
|
||||||
removeImage.src = "../icons/bin.png";
|
removeImage.src = "../images/bin.png";
|
||||||
removeImage.inject(container);
|
removeImage.inject(container);
|
||||||
|
|
||||||
if (!designer._viewMode)
|
if (!designer._viewMode)
|
||||||
@ -286,17 +286,17 @@ mindplot.ImageIcon.prototype.ICON_IMAGE_MAP[mindplot.ImageIcon.ICON_TYPE_TAG_PIN
|
|||||||
mindplot.ImageIcon.prototype.ICON_IMAGE_MAP[mindplot.ImageIcon.ICON_TYPE_TAG_YELLOW] = "../icons/tag_yellow.png";
|
mindplot.ImageIcon.prototype.ICON_IMAGE_MAP[mindplot.ImageIcon.ICON_TYPE_TAG_YELLOW] = "../icons/tag_yellow.png";
|
||||||
mindplot.ImageIcon.prototype.ICON_IMAGE_MAP[mindplot.ImageIcon.ICON_TYPE_TAG_PURPLE] = "../icons/tag_purple.png";
|
mindplot.ImageIcon.prototype.ICON_IMAGE_MAP[mindplot.ImageIcon.ICON_TYPE_TAG_PURPLE] = "../icons/tag_purple.png";
|
||||||
//FACES
|
//FACES
|
||||||
mindplot.ImageIcon.prototype.ICON_IMAGE_MAP[mindplot.ImageIcon.ICON_TYPE_FACE_FUNY_ANGEL] = "../icons/face-angel.png";
|
mindplot.ImageIcon.prototype.ICON_IMAGE_MAP[mindplot.ImageIcon.ICON_TYPE_FACE_FUNY_ANGEL] = "../icons/face-_angel.png";
|
||||||
mindplot.ImageIcon.prototype.ICON_IMAGE_MAP[mindplot.ImageIcon.ICON_TYPE_FACE_FUNY_DEVIL] = "../icons/face-devilish.png";
|
mindplot.ImageIcon.prototype.ICON_IMAGE_MAP[mindplot.ImageIcon.ICON_TYPE_FACE_FUNY_DEVIL] = "../icons/face_devilish.png";
|
||||||
mindplot.ImageIcon.prototype.ICON_IMAGE_MAP[mindplot.ImageIcon.ICON_TYPE_FACE_FUNY_GLASSES] = "../icons/face-glasses.png";
|
mindplot.ImageIcon.prototype.ICON_IMAGE_MAP[mindplot.ImageIcon.ICON_TYPE_FACE_FUNY_GLASSES] = "../icons/face_glasses.png";
|
||||||
mindplot.ImageIcon.prototype.ICON_IMAGE_MAP[mindplot.ImageIcon.ICON_TYPE_FACE_FUNY_KISS] = "../icons/face-kiss.png";
|
mindplot.ImageIcon.prototype.ICON_IMAGE_MAP[mindplot.ImageIcon.ICON_TYPE_FACE_FUNY_KISS] = "../icons/face_kiss.png";
|
||||||
mindplot.ImageIcon.prototype.ICON_IMAGE_MAP[mindplot.ImageIcon.ICON_TYPE_FACE_FUNY_MONKEY] = "../icons/face-monkey.png";
|
mindplot.ImageIcon.prototype.ICON_IMAGE_MAP[mindplot.ImageIcon.ICON_TYPE_FACE_FUNY_MONKEY] = "../icons/face_monkey.png";
|
||||||
mindplot.ImageIcon.prototype.ICON_IMAGE_MAP[mindplot.ImageIcon.ICON_TYPE_FACE_PLAIN] = "../icons/face-plain.png";
|
mindplot.ImageIcon.prototype.ICON_IMAGE_MAP[mindplot.ImageIcon.ICON_TYPE_FACE_PLAIN] = "../icons/face_plain.png";
|
||||||
mindplot.ImageIcon.prototype.ICON_IMAGE_MAP[mindplot.ImageIcon.ICON_TYPE_FACE_CRYING] = "../icons/face-crying.png";
|
mindplot.ImageIcon.prototype.ICON_IMAGE_MAP[mindplot.ImageIcon.ICON_TYPE_FACE_CRYING] = "../icons/face_crying.png";
|
||||||
mindplot.ImageIcon.prototype.ICON_IMAGE_MAP[mindplot.ImageIcon.ICON_TYPE_FACE_SAD] = "../icons/face-sad.png";
|
mindplot.ImageIcon.prototype.ICON_IMAGE_MAP[mindplot.ImageIcon.ICON_TYPE_FACE_SAD] = "../icons/face_sad.png";
|
||||||
mindplot.ImageIcon.prototype.ICON_IMAGE_MAP[mindplot.ImageIcon.ICON_TYPE_FACE_SMILE] = "../icons/face-smile.png";
|
mindplot.ImageIcon.prototype.ICON_IMAGE_MAP[mindplot.ImageIcon.ICON_TYPE_FACE_SMILE] = "../icons/face_smile.png";
|
||||||
mindplot.ImageIcon.prototype.ICON_IMAGE_MAP[mindplot.ImageIcon.ICON_TYPE_FACE_SURPRISE] = "../icons/face-surprise.png";
|
mindplot.ImageIcon.prototype.ICON_IMAGE_MAP[mindplot.ImageIcon.ICON_TYPE_FACE_SURPRISE] = "../icons/face_surprise.png";
|
||||||
mindplot.ImageIcon.prototype.ICON_IMAGE_MAP[mindplot.ImageIcon.ICON_TYPE_FACE_WINK] = "../icons/face-wink.png";
|
mindplot.ImageIcon.prototype.ICON_IMAGE_MAP[mindplot.ImageIcon.ICON_TYPE_FACE_WINK] = "../icons/face_wink.png";
|
||||||
|
|
||||||
//ARROWS
|
//ARROWS
|
||||||
mindplot.ImageIcon.prototype.ICON_IMAGE_MAP[mindplot.ImageIcon.ICON_TYPE_ARROW_UP] = "../icons/arrow_up.png";
|
mindplot.ImageIcon.prototype.ICON_IMAGE_MAP[mindplot.ImageIcon.ICON_TYPE_ARROW_UP] = "../icons/arrow_up.png";
|
||||||
|
@ -24,7 +24,6 @@ public enum IconFamily {
|
|||||||
TAG("TAG","tag_"),
|
TAG("TAG","tag_"),
|
||||||
NUMBER("NUMBER","number_"),
|
NUMBER("NUMBER","number_"),
|
||||||
SMILEY("FACE","face_"),
|
SMILEY("FACE","face_"),
|
||||||
FACE_FUNY("FACEFUNY","facefuny_"),
|
|
||||||
ARROW("ARROW","arrow_"),
|
ARROW("ARROW","arrow_"),
|
||||||
ARROWC("ARROWC","arrowc_"),
|
ARROWC("ARROWC","arrowc_"),
|
||||||
CONN("CONN","conn_"),
|
CONN("CONN","conn_"),
|
||||||
|
Before Width: | Height: | Size: 992 B After Width: | Height: | Size: 992 B |
Before Width: | Height: | Size: 936 B After Width: | Height: | Size: 936 B |
Before Width: | Height: | Size: 855 B After Width: | Height: | Size: 855 B |
Before Width: | Height: | Size: 949 B After Width: | Height: | Size: 949 B |
Before Width: | Height: | Size: 905 B After Width: | Height: | Size: 905 B |
Before Width: | Height: | Size: 919 B After Width: | Height: | Size: 919 B |
Before Width: | Height: | Size: 784 B After Width: | Height: | Size: 784 B |
Before Width: | Height: | Size: 894 B After Width: | Height: | Size: 894 B |
Before Width: | Height: | Size: 918 B After Width: | Height: | Size: 918 B |
Before Width: | Height: | Size: 896 B After Width: | Height: | Size: 896 B |
Before Width: | Height: | Size: 919 B After Width: | Height: | Size: 919 B |
Before Width: | Height: | Size: 917 B After Width: | Height: | Size: 917 B |
Before Width: | Height: | Size: 914 B After Width: | Height: | Size: 914 B |
Before Width: | Height: | Size: 592 B |
Before Width: | Height: | Size: 537 B |
@ -0,0 +1,47 @@
|
|||||||
|
package com.wisemapping.test.model;
|
||||||
|
|
||||||
|
|
||||||
|
import com.wisemapping.model.IconFamily;
|
||||||
|
import com.wisemapping.model.MindmapIcon;
|
||||||
|
import com.wisemapping.model.MindmapIcons;
|
||||||
|
import org.testng.Assert;
|
||||||
|
import org.testng.annotations.Test;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public class IconsTest {
|
||||||
|
@Test
|
||||||
|
void checkImagesByFamily() throws IllegalAccessException {
|
||||||
|
List<MindmapIcon> iconByFamily = MindmapIcons.getIconByFamily(IconFamily.BULLET);
|
||||||
|
Assert.assertEquals(iconByFamily.size(), 7);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void checkPngFile() throws IllegalAccessException {
|
||||||
|
|
||||||
|
IconFamily[] values = IconFamily.values();
|
||||||
|
for (IconFamily family : values) {
|
||||||
|
final List<MindmapIcon> iconByFamily = MindmapIcons.getIconByFamily(family);
|
||||||
|
for (MindmapIcon mindmapIcon : iconByFamily) {
|
||||||
|
final String pngName = mindmapIcon.getId() + ".png";
|
||||||
|
File file = new File("src/main/webapp/icons/", pngName);
|
||||||
|
if (!file.exists()) {
|
||||||
|
System.err.println("File not found:" + pngName);
|
||||||
|
}
|
||||||
|
// else {
|
||||||
|
// System.err.println("Found:" + pngName);
|
||||||
|
// }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -1,20 +0,0 @@
|
|||||||
package com.wisemapping.test.model;
|
|
||||||
|
|
||||||
|
|
||||||
import com.wisemapping.model.IconFamily;
|
|
||||||
import com.wisemapping.model.MindmapIcon;
|
|
||||||
import com.wisemapping.model.MindmapIcons;
|
|
||||||
import org.testng.Assert;
|
|
||||||
import org.testng.annotations.Test;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Test
|
|
||||||
public class ImagesTest {
|
|
||||||
@Test
|
|
||||||
void checkImagesByFamily() throws IllegalAccessException {
|
|
||||||
List<MindmapIcon> iconByFamily = MindmapIcons.getIconByFamily(IconFamily.BULLET);
|
|
||||||
Assert.assertEquals(iconByFamily.size(), 7);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|