Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated styles and drules to store colors section #5378

Merged
merged 4 commits into from
Feb 9, 2017

Conversation

rokuz
Copy link

@rokuz rokuz commented Feb 8, 2017

No description provided.

@rokuz rokuz requested a review from Zverik February 8, 2017 10:38
@Zverik
Copy link
Contributor

Zverik commented Feb 8, 2017

Нужен пробел после двоеточия. Также, хорошо бы разделить атрибуты на общие для тёмного и светлого стилей (в ../include/colors.mapcss, например) и различающиеся. Для цветов из colors.mapcss нужно использовать переменные. Например, цвета для shield есть в конце colors.mapcss. Таким образом можно уменьшить дублирование переменных, вынеся больше в общий файл.

@rokuz
Copy link
Author

rokuz commented Feb 8, 2017

Пробел - ладно, могу поставить. Все остальное дело настройки стиля, который будут делать специально обученные люди.

@rokuz
Copy link
Author

rokuz commented Feb 8, 2017

@Zverik PTAL

TrafficG1-color: #E63C37;
TrafficG2-color: #E63C37;
TrafficG3-color: #FAB423;
TrafficG3-opacity: 0.5;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Почему G3 здесь и выше — единственный цвет с прозрачностью?

Copy link
Author

@rokuz rokuz Feb 8, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Это значение не используется как прозрачность. Альфаканал цветов трафика кодирует цвет стрелки направления при рендеринге. У этого цвета особенная стрелка

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ох. Тогда сделай, пожалуйста, две переменные, типа @arrow_forward: 0.5; @arrow_backward: 1; и используй их.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

тогда уж arrow_light, arrow_dark.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Zverik done

@rokuz rokuz force-pushed the new-drules branch 2 times, most recently from ec73bda to f3a50ac Compare February 8, 2017 13:44
@Zverik
Copy link
Contributor

Zverik commented Feb 8, 2017

Я дошёл до drules_proto.txt, и он не очень хорошо выглядит: colors { colors { name, color } }. Может, ещё не поздно переделать это в colors { color { name, value } }?

@Zverik
Copy link
Contributor

Zverik commented Feb 9, 2017

@therearesomewhocallmetim посмотри и замёржи плз

@syershov syershov merged commit 02558d1 into mapsme:master Feb 9, 2017
color {
name: "RoadShieldGreenText"
value: 16777215
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Для того скрипта, который уже есть, было бы гораздо удобнее, если бы элемент, в котором хранится значение цвета, назывался бы color, а те элементы, которые не содержат значение цвета, не назывались бы color. Предлагаю что-нибудь типа:

palette {
  color_element {
    name: "SomeGoodName"
    color: 1234567
  }
  ...
}

@Zverik
Copy link
Contributor

Zverik commented Feb 9, 2017

Варианты:

palette { color_element { name, color } }
colors { color_data/color_info { name, color } }
colors { value { name, color } }
colors { def { name, color } }

Выбрали value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants